# HG changeset patch # User Pascal Bellard # Date 1304174244 -7200 # Node ID 712b7c1ce69a0201ed3bbeb106fb98c0af609835 # Parent 40deda5cd878c97524df8335c0ce7bc592799a4a busybox: ensure $stuff is set. tazwok bug ? diff -r 40deda5cd878 -r 712b7c1ce69a busybox/receipt --- a/busybox/receipt Fri Apr 29 22:13:36 2011 +0200 +++ b/busybox/receipt Sat Apr 30 16:37:24 2011 +0200 @@ -15,6 +15,7 @@ apply_bb_patchs() { cd $src + stuff=${stuff:-stuff} while read file; do [ -f done.$file ] && continue echo "Apply $file..." diff -r 40deda5cd878 -r 712b7c1ce69a get-opera/stuff/get-opera --- a/get-opera/stuff/get-opera Fri Apr 29 22:13:36 2011 +0200 +++ b/get-opera/stuff/get-opera Sat Apr 30 16:37:24 2011 +0200 @@ -1,7 +1,9 @@ #!/bin/sh -e +PACKAGE="opera" URL=http://mirrors.dedipower.com/opera/linux/ ROOT="$1" +[ -d "$ROOT" ] || ROOT="" if test $(id -u) != 0 ; then echo -e "\nYou must be root to run `basename $0`." @@ -9,35 +11,33 @@ exit 0 fi -if [ -d $ROOT/var/lib/tazpkg/installed/opera ]; then - [ -n "$ROOT" ] && exit 1 - tazpkg remove opera - [ -d /var/lib/tazpkg/installed/opera ] && exit 1 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then + [ -n "$ROOT" ] && exit 1 + tazpkg remove $PACKAGE + [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 fi -TMP_DIR=/tmp/get-opera-$$-$RANDOM +TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM CUR_DIR=$(pwd) mkdir -p $TMP_DIR && cd $TMP_DIR get_releases() { - wget -O - "$URL?C=M;O=D" 2>/dev/null | awk '/folder/ { print $5 }' | \ - sed -e 's/href="\(.*\)">.*/\1/' -e 's|/||' + wget -qO- "$URL?C=M;O=D" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d' } # Download deb -for RELEASE in $(get_releases); do - [ -n "$RELEASE" ] || continue - FILE=$(wget -O - "$URL$RELEASE/" 2> /dev/null | grep i386.deb | sed 's/.*href="\(.*\)">.*/\1/' | head -n 1) - [ -n "$FILE" ] || continue - wget $URL$RELEASE/$FILE - [ -s $FILE ] && break +for RELEASE in $@ $(get_releases); do + FILE=$(wget -O- "$URL$RELEASE/" 2>/dev/null | sed 's|.*[Ff]="\(.*\)".*|\1|;/6.d/!d;q') + [ -n "$FILE" ] || continue + wget $URL$RELEASE/$FILE + [ -s $FILE ] && break done if [ ! -f $FILE ]; then cd $CUR_DIR rm -rf $TMP_DIR - echo "Could not download $FILE. Exiting." + echo "Could not download $FILE from $URL. Exiting." exit 1 fi @@ -95,7 +95,7 @@ cd ../.. cat > opera-$VERSION/receipt <