From 40e821f7434a6c64aed2201d7e0990515400b69a Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 15 May 2016 19:22:32 +0200 Subject: [PATCH] Update getapp --- client/getapp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/getapp b/client/getapp index a973d08..73a024e 100644 --- a/client/getapp +++ b/client/getapp @@ -3,10 +3,12 @@ # Usage: # getapp Firefox # For the list of available apps, see https://bintray.com/probono/AppImages/ -set +e + +set -e ARCH=$(arch) -PKGPATH=$(wget -c "https://bintray.com/probono/AppImages/$1/_latestVersion#files" -O - | grep pkgPath | cut -d '"' -f 6) +PKGPATH=$(wget -q "https://bintray.com/probono/AppImages/$1/_latestVersion#files" -O - | grep pkgPath | cut -d '"' -f 6) VERSION=$(echo $PKGPATH | cut -d "/" -f 5) -ls "$1-$VERSION-$ARCH.AppImage"|| wget "https://bintray.com/probono/AppImages/download_file?file_path=$1-$VERSION-"$(arch)".AppImage" -O "$1-$VERSION-$ARCH.AppImage" +URL="https://bintray.com/probono/AppImages/download_file?file_path=$1-$VERSION-$ARCH.AppImage" +ls "$1-$VERSION-$ARCH.AppImage" || wget "$URL" -O "$1-$VERSION-$ARCH.AppImage" chmod a+x "$1-$VERSION-$ARCH.AppImage" -exec ./"$1-$VERSION-$ARCH.AppImage" +./"$1-$VERSION-$ARCH.AppImage"