X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=scripts%2FDownload;h=5001ce6ab354659a220d195733b4956b5e1501d2;hb=78018a798ab055835e4e08c65ce8d3b4ad994ee1;hp=2d0126cb93cdd356a645c48d1de7973f7688140a;hpb=6ae193981fcc05dcc495b4bde92cb8fd290ee4dd;p=hdw-linux%2Fhdw-linux.git diff --git a/scripts/Download b/scripts/Download index 2d0126c..5001ce6 100755 --- a/scripts/Download +++ b/scripts/Download @@ -215,12 +215,21 @@ for dir in `ls -A --ignore="CVS" ./download`; do location="${mirror}/hdw-linux-${hdw_version}/$dir/$pkg/" echo "Downloading $dir - package $file ..." echo + # possibly the package exists mkdir -p ./download/$dir/$pkg ; cd ./download/$dir/$pkg + tolf="`find ../.. -name $file | tail -1`" + if [ -n "$tolf" ] ; then + [ -d $tolf ] && tolf="" + fi if [ -f ./$file ] ; then echo "$file allready downloaded." echo + elif [ -n "$tolf" ] ; then + ln -svf $tolf . else - $wget_cmd -c $location$file -O pkg-src.in && \ + + $wget_cmd -c $location$file \ + -O pkg-src.in && mv pkg-src.in $file echo "done." fi