diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2009-12-06 14:38:46 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2009-12-06 14:38:46 +0100 |
commit | b1d85a45f61f0682080a4db00801f0a01c44fa9e (patch) | |
tree | 98d7834b2e4478b3af13dd390562ab02edb84eb9 /cleanup-sources.sh | |
download | goattracker-package-b1d85a45f61f0682080a4db00801f0a01c44fa9e.tar.gz goattracker-package-b1d85a45f61f0682080a4db00801f0a01c44fa9e.tar.xz goattracker-package-b1d85a45f61f0682080a4db00801f0a01c44fa9e.zip |
Initial commit
Diffstat (limited to 'cleanup-sources.sh')
-rwxr-xr-x | cleanup-sources.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cleanup-sources.sh b/cleanup-sources.sh new file mode 100755 index 0000000..9309aab --- /dev/null +++ b/cleanup-sources.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -ex + +version=$1 +if test "x$version" = "x"; then + echo "Usage: $(basename "$0") VERSION" + exit 13 +fi +baseurl=http://prdownloads.sourceforge.net/goattracker2 + +function cleanup_zipfile() { + zip_suffix=$1 + tar_suffix=$2 + zipfile=GoatTracker_${version}${zip_suffix}.zip + url=${baseurl}/${zipfile} + + test -f "$zipfile" || wget "$url" + + subdir=goattracker-${version}${tar_suffix} + rm -rf "$subdir/" + + unzip -d "$subdir" "$zipfile" + + find "$subdir" \( -name '*.exe' -or -name '*.dll' \) -print -exec rm -f {} \; + rmdir "$subdir"/* ||: + + tar cvf - "${subdir}/" | xz -c > "${subdir}.tar.xz" +} + +cleanup_zipfile +# cleanup_zipfile _Stereo -stereo |