sysv() {
- e "$@"
+ echo "$@"
"$@"
}
shopt -s nullglob
-shopt -s extglob
+shopt -s extglob # note, already set with bash -l
# if we make a link back to the root, traversing the subdirs stops.
# This makes it so we can do subdir directories. Must call with absolute
local root="$1"
local targets=()
if [[ $2 ]]; then
- targets=( "$2"/!(.git) )
+ targets=( "$2"/!(.git|..|.) )
else
- for f in "$1"/!(.git); do
+ for f in "$1"/!(.git|..|.); do
[[ -d $f ]] && targets+=("$f") ||:
done
fi
for dir in "$@"; do
fs_files=( $dir/filesystem/* )
if [[ -e ${fs_files[0]} && $USER == ian ]]; then
- sysv s cp -R ${fs_files[@]} /
+ # note, symlinks get resolved, not copied.
+ sysv s cp -RL ${fs_files[@]} /
fi
if [[ -e $dir/subdir_files ]]; then
subdir-link-r $dir/subdir_files