diff options
author | Squibid <me@zacharyscheiman.com> | 2024-08-10 02:40:04 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2024-08-10 02:40:04 -0400 |
commit | 46c1a319051ec87fe3cb8f14000e62e050abdab3 (patch) | |
tree | 4575224848e4ba72c9543fadf7155364ad02afe8 /auto. | |
parent | cec832f43f8971eb331678ce8d8a66ed9df816d6 (diff) | |
download | auto.s-46c1a319051ec87fe3cb8f14000e62e050abdab3.tar.gz auto.s-46c1a319051ec87fe3cb8f14000e62e050abdab3.tar.bz2 auto.s-46c1a319051ec87fe3cb8f14000e62e050abdab3.zip |
add root cp
Diffstat (limited to 'auto.')
-rwxr-xr-x | auto. | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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" |