aboutsummaryrefslogtreecommitdiffstats
path: root/auto.
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xauto.13
1 files changed, 9 insertions, 4 deletions
diff --git a/auto. b/auto.
index d86f855..e258cf5 100755
--- a/auto.
+++ b/auto.
@@ -165,13 +165,18 @@ while read -r line || return 0; do
# remove/add a file
elif printf "%s" "$line" | grep -q -- "->"; then
# get the path of the file
- sourcef=$(eval echo "${line%%\ ->*}")
+ sourcef=$(eval echo "${line%% *->*}")
# get the destination for the file
- destf=$(eval echo "${line##*->\ }")
+ destf=$(eval echo "${line##*->* }")
# install/uninstall
- [ $install ] && cp -rv -- "$sourcef" "$destf"
- [ $uninstall ] && rm -rv -- "$destf"
+ if printf "%s" "$line" | grep -q -- "#->"; then
+ [ $install ] && dort cp -rv -- "$sourcef" "$destf"
+ [ $uninstall ] && dort rm -rv -- "$destf"
+ else
+ [ $install ] && cp -rv -- "$sourcef" "$destf"
+ [ $uninstall ] && rm -rv -- "$destf"
+ fi
fi
done < "$topography"