2 # Create a new openwrt tree with symlinks pointing at the current tree
3 # Usage: ./scripts/symlink-tree.sh <destination>
25 if [ -f feeds.conf ] ; then
26 FILES="$FILES feeds.conf"
30 echo "Syntax: $0 <destination>" >&2
35 echo "Error: $1 already exists" >&2
39 set -e # fail if any commands fails
41 for file in $FILES; do
42 [ -e "$PWD/$file" ] || {
43 echo "ERROR: $file does not exist in the current tree" >&2
46 ln -s "$PWD/$file" "$1/"
48 for file in $OPTIONAL_FILES; do
49 [ -e "$PWD/$file" ] && ln -s "$PWD/$file" "$1/"