4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
15 # if we make a link back to the root, traversing the subdirs stops.
16 # This makes it so we can do subdir directories. Must call with absolute
26 [[ -d $f ]] && targets
+=("$f") ||
:
29 local below
="$( readlink -f "$root/..
")"
30 for path
in "${targets[@]}"; do
31 local fullpath
="$(readlink -f "$path")"
32 #e $fullpath $below # debug
33 if [[ -f $path || $
(dirname $
(readlink
-f "$fullpath")) == "$below" ]]; then
34 if [[ $dir == /p
/* ]]; then
39 for user
in ${homes[@]}; do
40 sysv lnf
-T "$path" "$user/${path#$root/}"
42 elif [[ -d "$path" ]]; then
43 subdir-link-r
"$root" "$path"
49 if [[ -e $1/subdir_files
]]; then
50 subdir-link-r
$1/subdir_files
52 local x
=( $1/!(subdir_files|filesystem
) )
53 (( ${#x[@]} >= 1 )) ||
return 0
55 # as of this writing, it doesn't exist in /a/c, but I've used it in the past.
56 if [[ -e $1/filesystem
]]; then
57 sysv s
cp -R $1/filesystem
/* /
61 # p needs to go first so .ssh link is created, then config link inside it
62 for dir
in {/a
/c
,/p
/c
}{,/machine_specific
/$HOSTNAME}; do
63 common-file-setup
$dir