From 78ed498483ddd7081fbaad5e9e8cab526d652c60 Mon Sep 17 00:00:00 2001 From: lars Date: Fri, 10 Nov 2006 09:06:23 +0000 Subject: [PATCH] added source package building script --- make-tar.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 make-tar.sh diff --git a/make-tar.sh b/make-tar.sh new file mode 100755 index 0000000..638161e --- /dev/null +++ b/make-tar.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -eu + +PRJ_ROOT=$(dirname $(cd "$(dirname $0)"; pwd)) + +PREFIX=cryptobox + +[ $# -lt 1 -o $# -gt 2 ] && echo "Syntax: `basename $0` VERSION" && echo && exit 1 +SRC_DIR=${PREFIX}-${1} +[ $# -eq 2 ] && SRC_DIR=$2 +[ ! -d "$SRC_DIR" ] && echo "the directory '$SRC_DIR' does not exist!" && exit 2 + +TMP_DIR=/tmp/${PREFIX}-${1} +[ -e "$TMP_DIR" ] && rm -rf "$TMP_DIR" + +svn export "$SRC_DIR" "$TMP_DIR" +tar czf "$PRJ_ROOT/tags/packages/${PREFIX}-${1}.tar.gz" -C "$(dirname $TMP_DIR)" --exclude-from="$SRC_DIR/package.exclude" --owner=0 --group=0 "$(basename $TMP_DIR)" +rm -rf "$TMP_DIR" +