script/symlink-tree.sh: Fix missing config dir
authorDaniel Dickinson <openwrt@daniel.thecshore.com>
Mon, 2 May 2016 02:40:09 +0000 (22:40 -0400)
committerJo-Philipp Wich <jo@mein.io>
Wed, 18 May 2016 20:17:28 +0000 (22:17 +0200)
Apparently symlink-tree has not been used in quite some time as it
fails to symlink the always required config dir

Also, if we pulled from git but .git is missing we get
many error messages on the symlinked tree without this
patch (which symlinks .git, if present)

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
scripts/symlink-tree.sh

index e44ebdabbfa96bdf52efb1ab04d983c11c9356f3..3b7ce4718d3d36f8b456903de867c2ec8f75d4c2 100755 (executable)
@@ -4,6 +4,7 @@
 
 FILES="
        BSDmakefile
+       config
        Config.in
        LICENSE
        Makefile
@@ -19,6 +20,9 @@ FILES="
        toolchain
        tools"
 
+OPTIONAL_FILES="
+       .git"
+
 if [ -f feeds.conf ] ; then
        FILES="$FILES feeds.conf"
 fi
@@ -42,4 +46,7 @@ for file in $FILES; do
        }
        ln -s "$PWD/$file" "$1/"
 done
+for file in $OPTIONAL_FILES; do
+       [ -e "$PWD/$file" ] && ln -s "$PWD/$file" "$1/"
+done
 exit 0