Fixed bug downloading

This commit is contained in:
clamsawd 2015-11-11 20:06:05 +01:00
parent 465ba3fd9c
commit f3b9ec48c6

View File

@ -5,9 +5,9 @@
# Created by clamsawd (clamsawd@openmailbox.org) # Created by clamsawd (clamsawd@openmailbox.org)
# Builds by John Van Sickle (john.vansickle@gmail.com) # Builds by John Van Sickle (john.vansickle@gmail.com)
# Licensed by GPL v.2 # Licensed by GPL v.2
# Date: 16-10-2015 # Date: 11-11-2015
# -------------------------------------- # --------------------------------------
VERSION=1.0 VERSION=1.1
URL=http://johnvansickle.com/ffmpeg/ URL=http://johnvansickle.com/ffmpeg/
URL_RELEASES=http://johnvansickle.com/ffmpeg/releases/ URL_RELEASES=http://johnvansickle.com/ffmpeg/releases/
@ -89,7 +89,7 @@ case $1 in
cd $TMP_DIR cd $TMP_DIR
rm -rf ffmpeg-* rm -rf ffmpeg-*
if [ "$2" == "release" ] ; then if [ "$2" == "release" ] ; then
curl $URL | grep "$URL_RELEASES" | cut -d '"' -f 2 | grep "$ARCH" > $TMP_DIR/ffmpeg-url curl $URL | grep "$URL_RELEASES" | cut -d '"' -f 2 | grep "$ARCH" | head -1 > $TMP_DIR/ffmpeg-url
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
echo "OK" > /dev/null echo "OK" > /dev/null
else else
@ -98,7 +98,7 @@ case $1 in
exit exit
fi fi
else else
curl $URL | grep "$URL_BUILDS" | cut -d '"' -f 2 | grep "$ARCH" > $TMP_DIR/ffmpeg-url curl $URL | grep "$URL_BUILDS" | cut -d '"' -f 2 | grep "$ARCH" | head -1 > $TMP_DIR/ffmpeg-url
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
echo "OK" > /dev/null echo "OK" > /dev/null
else else
@ -109,6 +109,8 @@ case $1 in
fi fi
URL_PACKAGE=`cat $TMP_DIR/ffmpeg-url` URL_PACKAGE=`cat $TMP_DIR/ffmpeg-url`
NAME_PACKAGE=`cat /tmp/ffmpeg-url | cut -d "/" -f 6` NAME_PACKAGE=`cat /tmp/ffmpeg-url | cut -d "/" -f 6`
clear
echo "Downloading $NAME_PACKAGE ($APP_DOWNLOAD)"
$APP_DOWNLOAD $URL_PACKAGE $APP_DOWNLOAD $URL_PACKAGE
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
echo "OK" > /dev/null echo "OK" > /dev/null