-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot.old
More file actions
executable file
·51 lines (44 loc) · 743 Bytes
/
dot.old
File metadata and controls
executable file
·51 lines (44 loc) · 743 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/zsh
SCRIPT_NAME="`basename $0`"
DOTFILES="$(dirname $(readlink -f $0))"
check_command(){
if command -v "$1" > /dev/null 2>&1; then
echo -n " [x] $1"
else
echo " [ ] $1"
fi
[ -n "$2" ] && echo " - $2" || echo
}
check_dependencies(){
echo optional dependencies:
check_command 'autojump' 'navigate common directories quickly'
}
dialog_loop(){
cat <<EOF
backup restore utility script options:
[c]heck dependencies
[i]nstall dotfiles
[q]uit
EOF
read -sk1 ans
case "$ans" in
c)
check_dependencies
exit 0
;;
i)
"$DOTFILES/install"
exit 0
;;
m)
modify_listfile
;;
q)
exit 0
;;
esac
}
while true; do
dialog_loop
echo
done