Home | History | Annotate | Download | only in scripts
      1 #! /bin/sh
      2 
      3 REMOTE_GIT=/pub/scm/utils/dtc/dtc.git
      4 REMOTE_PATH=/pub/software/utils/dtc
      5 
      6 set -e
      7 
      8 kup_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 
     28 for version; do
     29     kup_one $version
     30 done
     31 
     32