1#! /bin/sh 2 3REMOTE_GIT=/pub/scm/utils/dtc/dtc.git 4REMOTE_PATH=/pub/software/utils/dtc 5 6set -e 7 8kup_one () { 9 VERSION="$1" 10 11 TAG="v$VERSION" 12 13 PREFIX="dtc-$VERSION/" 14 TAR="dtc-$VERSION.tar" 15 SIG="$TAR.sign" 16 17 git archive --format=tar --prefix="$PREFIX" -o "$TAR" "$TAG" 18 gpg --detach-sign --armor -o "$SIG" "$TAR" 19 20 ls -l "$TAR"* 21 22 # Verify the signature as a sanity check 23 gpg --verify "$SIG" "$TAR" 24 25 kup put --tar --prefix="$PREFIX" "$REMOTE_GIT" "$TAG" "$SIG" "$REMOTE_PATH/$TAR.gz" 26} 27 28for version; do 29 kup_one $version 30done 31 32