diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:55:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:55:52 +0000 |
commit | f7a951d79bc895eb2171c2570add9f4899794a10 (patch) | |
tree | cc0c7147f472fecbc93add134f5c0e5c1bb72529 /contrib/release/upload-release.sh | |
parent | Initial commit. (diff) | |
download | dwz-4fb184be49430f1d777ce99c270ed80a487aa8a0.tar.xz dwz-4fb184be49430f1d777ce99c270ed80a487aa8a0.zip |
Adding upstream version 0.15.upstream/0.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/release/upload-release.sh')
-rwxr-xr-x | contrib/release/upload-release.sh | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/contrib/release/upload-release.sh b/contrib/release/upload-release.sh new file mode 100755 index 0000000..3c2abdd --- /dev/null +++ b/contrib/release/upload-release.sh @@ -0,0 +1,67 @@ +#!/bin/sh -x + +set -e + +pwd=$(pwd -P) + +version=$(cat VERSION) + +tag=dwz-$version +rootdir=dwz +tarfile=dwz-$version.tar +server=sourceware.org +ftpdir=/sourceware/ftp/pub/dwz/releases +# The server itself seems to add a sha512.sum file, so lets not duplicate that +# effort. +#checksums="md5sum sha512sum" +checksums="md5sum" + +repo="$pwd" + +dir=$(mktemp -d) + +cd $dir +git clone \ + $repo \ + $rootdir + +cd $dir/$rootdir +git ch $tag + +rm -Rf .git + +cd $dir +tar cvf \ + $tarfile \ + $rootdir + +xz \ + --best \ + -k \ + $tarfile + +gzip \ + --best \ + -k \ + $tarfile + +files=$(echo $tarfile.*) + +[ "$files" != "" ] + +ssh $server \ + "mkdir -p $ftpdir" + +scp \ + $files \ + "$server:$ftpdir" + +ssh $server \ + "cd $ftpdir && chmod 644 $files" + +for checksum in $checksums; do + ssh $server \ + "cd $ftpdir && touch $checksum && chmod 644 $checksum && ( $checksum $files >> $checksum )" +done + +rm -Rf $dir |