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