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'
for x in $(ls -a); do
[ "$x" = '.' ] || [ "$x" = '..' ] && continue;
[ -r "$HOME/$x" ] && mv -v "$HOME/$x" "$BACK_DIR"
ln -srv "$(pwd)/$x" "$HOME"
[ -r "$HOME/$x" ] && echo -ne "Backup: " && mv -v "$HOME/$x" "$BACK_DIR"
echo -ne "Linking: " && ln -srv "$(pwd)/$x" "$HOME"
done
IFS="$OLDIFS"