-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·40 lines (35 loc) · 1.01 KB
/
run.sh
File metadata and controls
executable file
·40 lines (35 loc) · 1.01 KB
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
#!/bin/bash
# Description: Main Menu
#
# Executes the command line interface.
# USAGE
# ./run.sh OPTION
# SETTINGS
set -o errexit
set -o pipefail
# LIBRARY
source ~/dotfiles/utilities.sh
source ~/dotfiles/options.sh
# EXECUTION
if [[ -d "$HOME" ]]; then
while true; do
if [[ $# == 0 ]]; then
printf "\nUsage: run OPTION\n"
printf "\nDotfile Options:\n"
printf " s: Show managed dotfiles.\n"
printf " i: Install dotfiles (existing files are skipped).\n"
printf " l: Link dotfiles to this project (interactive per file, excludes: env.sh, .gemrc, and .gitconfig).\n"
printf " c: Check for differences between \$HOME files and this project's files.\n"
printf " d: Delete dotfiles (interactive per file, excludes: env.sh, .gemrc, and .gitconfig).\n"
printf " q: Quit/Exit.\n\n"
read -p "Enter selection: " response
printf "\n"
process_option $response
else
process_option $1
fi
done
else
printf "ERROR: $HOME does not exist.\n"
return 1
fi