-
Notifications
You must be signed in to change notification settings - Fork 0
/
_restore.sh
executable file
·30 lines (25 loc) · 959 Bytes
/
_restore.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# shellcheck disable=SC1004
ASCII_STOW='
___ ___ ___ ___
/\ \ /\ \ /\ \ /\__\
/::\ \ \:\ \ /::\ \ /:/ _/_
/:/\ \ \ \:\ \ /:/\:\ \ /:/ /\__\
_\:\~\ \ \ /::\ \ /:/ \:\ \ /:/ /:/ _/_
/\ \:\ \ \__\ /:/\:\__\ /:/__/ \:\__\ /:/_/:/ /\__\
\:\ \:\ \/__/ /:/ \/__/ \:\ \ /:/ / \:\/:/ /:/ /
\:\ \:\__\ /:/ / \:\ /:/ / \::/_/:/ /
\:\/:/ / \/__/ \:\/:/ / \:\/:/ /
\::/ / \::/ / \::/ /
\/__/ \/__/ \/__/
'
echo "$ASCII_STOW"
for file in *; do
if [ -d "$file" ]; then
read -r -e -p "[y/N] - Restore ${file}? " response
if [[ "$response" == [Yy]* ]]; then
stow -t "$HOME" "$file"
fi
fi
done
# NOTE: to un-stow a directory, run `stow -t "$HOME" -D tmux`