www.nico.schottelius.org/software/cinit/browse_source/cinit-0.2.1/bin/cinit.release

37 lines
947 B
Text
Raw Normal View History

#!/bin/sh
# Nico Schottelius
# Build release tar
# Date: Sat Oct 15 21:38:29 CEST 2005
# Last Changed: Fr Okt 28 01:24:58 CEST 2005
if [ $# -ne 2 ]; then
echo $(basename $0): source-dir version
exit 1
fi
DIR=$1
VERSION=$2
OUT_NAME=cinit-${VERSION}.tar.bz2
D_HOST=creme.schottelius.org
D_DIR=www/org/schottelius/linux/cinit/archives/
D_SOURCE=www/org/schottelius/linux/cinit/browse_source/
if [ ! -d "$DIR" ]; then
echo "$DIR is not a directory"
exit 1
fi
( cd "$DIR" && make clean ) || exit 1
echo "Creating bzip2 compressed tar"
tar cj -X $DIR/.exclude -f "$OUT_NAME" $DIR
chmod 0644 "$OUT_NAME"
echo "Transfering to $D_HOST"
scp "$OUT_NAME" "$D_HOST:$D_DIR"
echo "Extracting to $D_SOURCE"
ssh "$D_HOST" "tar xfj $D_DIR/$OUT_NAME -C $D_SOURCE"
echo "Correcting paranoid permissions"
ssh "$D_HOST" "find \"$D_SOURCE/$DIR\" -type f -exec chmod 0644 {} \\;"
ssh "$D_HOST" "find \"$D_SOURCE/$DIR\" -type d -exec chmod 0755 {} \\;"