ezmlm-web-archiv/make-tar.sh
2005-10-11 21:27:44 +00:00

13 lines
408 B
Bash
Executable file

#!/bin/sh
set -eu
[ $# -ne 1 ] && echo "Syntax: `basename $0` VERSION" && echo && exit 1
[ ! -d "ezmlm-web-${1}" ] && echo "the directory 'ezmlm-web-${1}' does not exist!" && exit 2
TMP_DIR=/tmp/ezmlm-web-${1}
[ -e "$TMP_DIR" ] && rm -rf "$TMP_DIR"
svn export "ezmlm-web-${1}" "$TMP_DIR"
tar czf ezmlm-web-${1}.tar.gz -C "$(dirname $TMP_DIR)" --owner=0 --group=0 "$(basename $TMP_DIR)"
rm -rf "$TMP_DIR"