Fix sourecode upload.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 16 Jan 2014 10:06:49 +0000 (11:06 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 16 Jan 2014 10:06:49 +0000 (11:06 +0100)
make.sh

diff --git a/make.sh b/make.sh
index 5d12665..cb04763 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1083,11 +1083,11 @@ uploadsrc)
        fi
 
        URL_SOURCE=$(grep URL_SOURCE lfs/Config | awk '{ print $3 }')
-       REMOTE_FILES=$(echo "ls -1 --ignore=toolchains" | sftp -C ${IPFIRE_USER}@${URL_SOURCE})
+       REMOTE_FILES=$(echo "ls -1" | sftp -C ${IPFIRE_USER}@${URL_SOURCE})
 
-       cd $BASEDIR/cache/
-       for file in $(ls -1 --ignore=toolchains); do
-               grep -q "$file" <<<$REMOTE_FILES && continue
+       for file in ${BASEDIR}/cache/*; do
+               [ -d "${file}" ] && continue
+               grep -q "$(basename ${file})" <<<$REMOTE_FILES && continue
                NEW_FILES="$NEW_FILES $file"
        done
        [ -n "$NEW_FILES" ] && scp -2 $NEW_FILES ${IPFIRE_USER}@${URL_SOURCE}