From 8ef2da565d14749cb295ed32344447b1a1b6acb4 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 18 Dec 2010 22:51:08 +0100 Subject: [PATCH] scripts/get: quote tests and some more variables Signed-off-by: Stephan Raue --- scripts/get | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/get b/scripts/get index 475af7211e..85cd275144 100755 --- a/scripts/get +++ b/scripts/get @@ -2,7 +2,7 @@ . config/options $1 -if [ -z $1 ]; then +if [ -z "$1" ]; then for i in `find packages/ -type f -name meta`; do GET_PKG=`grep ^PKG_NAME= $i | sed -e "s,\",,g" -e "s,PKG_NAME=,,"` $SCRIPTS/get $GET_PKG @@ -21,7 +21,7 @@ if [ -n "$PKG_URL" ]; then mkdir -p $SOURCES/$1 - if [ -f $STAMP ]; then + if [ -f "$STAMP" ]; then [ `cat $STAMP` = "$i" ] && continue fi DL="yes" @@ -33,12 +33,12 @@ if [ -n "$PKG_URL" ]; then printf "%${INDENT}c GET $1\n" >&$SILENT_OUT export INDENT=$((${INDENT:-1}+$INDENT_SIZE)) - [ "$VERBOSE" != yes ] && WGET_OPT=-q + [ "$VERBOSE" != "yes" ] && WGET_OPT=-q - NBWGET=1 - until [ -f $STAMP ] || wget --passive-ftp --no-check-certificate -c $WGET_OPT -P $SOURCES/$1 $i; do + NBWGET="1" + until [ -f "$STAMP" ] || wget --passive-ftp --no-check-certificate -c $WGET_OPT -P $SOURCES/$1 $i; do NBWGET=$(($NBWGET+1)) - if [ $NBWGET -gt 10 ]; then + if [ "$NBWGET" -gt "10" ]; then echo -e "\nCant't get $1 sources : $i\n Try later !!" exit 1 fi @@ -52,4 +52,3 @@ if [ -n "$PKG_URL" ]; then done fi -