iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d53b37d
)
bash 4.4 fix
author
Ian Kelling
<ian@iankelling.org>
Mon, 26 Sep 2016 22:48:15 +0000
(15:48 -0700)
committer
Ian Kelling
<ian@iankelling.org>
Mon, 26 Sep 2016 22:48:15 +0000
(15:48 -0700)
conflink
patch
|
blob
|
history
diff --git
a/conflink
b/conflink
index d348078b5d8a5a51ac3a22f450a4f6e864ca8e51..c385ca04e8e7c9738edaa7be5b480bb25ddef05d 100755
(executable)
--- a/
conflink
+++ b/
conflink
@@
-5,7
+5,7
@@
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
sysv() {
sysv() {
- e "$@"
+ e
cho
"$@"
"$@"
}
"$@"
}
@@
-14,7
+14,7
@@
sysv() {
shopt -s nullglob
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
# 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
@@
-24,9
+24,9
@@
subdir-link-r() {
local root="$1"
local targets=()
if [[ $2 ]]; then
local root="$1"
local targets=()
if [[ $2 ]]; then
- targets=( "$2"/!(.git) )
+ targets=( "$2"/!(.git
|..|.
) )
else
else
- for f in "$1"/!(.git); do
+ for f in "$1"/!(.git
|..|.
); do
[[ -d $f ]] && targets+=("$f") ||:
done
fi
[[ -d $f ]] && targets+=("$f") ||:
done
fi
@@
-47,7
+47,8
@@
common-file-setup() {
for dir in "$@"; do
fs_files=( $dir/filesystem/* )
if [[ -e ${fs_files[0]} && $USER == ian ]]; then
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
fi
if [[ -e $dir/subdir_files ]]; then
subdir-link-r $dir/subdir_files