diff --git a/bootstrap/autostow.sh b/bootstrap/autostow.sh index 3f72b14..8338d4a 100755 --- a/bootstrap/autostow.sh +++ b/bootstrap/autostow.sh @@ -12,27 +12,21 @@ main() { case "$1" in -s | --stow) have_stow - echo "Creating dotfile symlinks ................................................." stow_dirs - echo "Done creating symlinks ...................................................." exit 0 ;; -d | --delete) have_stow - echo "Removing dotfile symlinks ................................................." unstow_dirs - echo "Done removing symlinks ...................................................." exit 0 ;; -n | --dry-run) have_stow - echo "Printing processed directories ............................................" dryrun - echo "Done printing directories ................................................." exit 0 ;; -v | --version) - printf "System bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.2\n" + printf "System bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.2.1\n" ;; -h | --help | *) usage @@ -43,6 +37,7 @@ main() { } stow_dirs() { + printf "Creating dotfile symlinks .................................................\n" for d in */; do if is_ignored "$d"; then @@ -53,9 +48,11 @@ stow_dirs() { printf "stowing %s\n" "$d" stow -S -t ~ "$d" done + printf "Done creating symlinks ....................................................\n" } unstow_dirs() { + printf "Removing dotfile symlinks .................................................\n" for d in */; do if is_ignored "$d"; then @@ -66,9 +63,11 @@ unstow_dirs() { printf "unstowing %s\n" "$d" stow -D -t ~ "$d" done + printf "Done removing symlinks ....................................................\n" } dryrun() { + printf "Printing processed directories ............................................\n" for d in */; do if is_ignored "$d"; then @@ -78,7 +77,7 @@ dryrun() { printf "processing %s\n" "$d" done - echo "Done printing directories ................................................." + printf "Done printing directories .................................................\n" } is_ignored() {