Be more verbose when doing the backup / linking

This commit is contained in:
2018-10-18 12:48:20 +08:00
parent e3bcaeaaf2
commit 1b3b8fecb2

View File

@@ -14,7 +14,7 @@ OLDIFS="$IFS"
IFS=$'\n' IFS=$'\n'
for x in $(ls -a); do for x in $(ls -a); do
[ "$x" = '.' ] || [ "$x" = '..' ] && continue; [ "$x" = '.' ] || [ "$x" = '..' ] && continue;
[ -r "$HOME/$x" ] && mv -v "$HOME/$x" "$BACK_DIR" [ -r "$HOME/$x" ] && echo -ne "Backup: " && mv -v "$HOME/$x" "$BACK_DIR"
ln -srv "$(pwd)/$x" "$HOME" echo -ne "Linking: " && ln -srv "$(pwd)/$x" "$HOME"
done done
IFS="$OLDIFS" IFS="$OLDIFS"