diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2008-04-21 01:29:47 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2008-04-21 01:29:47 +0000 |
commit | 7c3824c02d9dc01322cba6cbc885588fbaa4dfb3 (patch) | |
tree | 89954e1c5367d457a3ed5a73685f854a7e588e9d /games/strategy/dopewars/dopewars.SlackBuild | |
parent | ebafcfd94f03d27c361b46392c5366f6bb676b70 (diff) | |
download | slackbuilds-7c3824c02d9dc01322cba6cbc885588fbaa4dfb3.tar.gz slackbuilds-7c3824c02d9dc01322cba6cbc885588fbaa4dfb3.tar.bz2 |
dopewars: URL fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1701 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'games/strategy/dopewars/dopewars.SlackBuild')
-rwxr-xr-x | games/strategy/dopewars/dopewars.SlackBuild | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/games/strategy/dopewars/dopewars.SlackBuild b/games/strategy/dopewars/dopewars.SlackBuild index 5755e503..07f07792 100755 --- a/games/strategy/dopewars/dopewars.SlackBuild +++ b/games/strategy/dopewars/dopewars.SlackBuild @@ -77,7 +77,7 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR # Dowload source if necessary SRC="$SRC_NAME-$VERSION.tar.gz" -URL="http://prdownloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz" +URL="http://downloads.sourceforge.net/dopewars/$SRC" if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET @@ -93,12 +93,37 @@ EOKEY fi # Download source's signature if necessary and check it -SIGNATURE="`basename http://download.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg`" -if [ ! -s "$SRC_DIR/$SRC.sig" ]; then - wget "http://prdownloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET +if echo http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg | grep -q -v "SIGNING URL"; then + SIGNATURE="`basename http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg`" + if [ ! -s "$SRC_DIR/$SIGNATURE" ]; then + wget "http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET + fi +else + if [ -f "$SRC_DIR/$SRC.sig" ]; then + SIGNATURE="$SRC.sig" + elif [ -f "$SRC_DIR/$SRC.asc" ]; then + SIGNATURE="$SRC.asc" + else + echo Trying to get signature file from $URL.sig... + if wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"; then + SIGNATURE="$SRC.sig" + else + rm $SRC_DIR/$SRC.sig + echo Trying to get signature file from $URL.asc... + if wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"; then + SIGNATURE="$SRC.asc" + else + rm $SRC_DIR/$SRC.asc + echo "Error getting source's signature file" + exit $ERROR_GPG + fi + fi + fi fi +echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE... gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG +echo Success. # Untar cd "$PKG_WORK" |