-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun
executable file
·42 lines (33 loc) · 1.05 KB
/
run
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
#!/bin/zsh
cd "${0:a:h}"
OVERWRITE_EXISTING=0
while [[ $# -gt 0 ]]
do
case $1 in
--force-root ) FORCE_ROOT=1 ;;
--ci ) export CI=1 ;;
--overwrite ) OVERWRITE_EXISTING=1 ;;
--no-compile-dmenu ) COMPILE_DMENU=0 ;;
--min )
MIN=1
COMPILE_DMENU=0
;;
esac
shift 1
done
source ./requirements.zsh || exit 1
################################################################################
LOGFILE="${HOME}/dotwryn-install.txt"
STATUS "installation start : $(date)" 2>> "${LOGFILE}"
{
SETUP__OS || FAIL 1 'failed to set up os-dependencies (see above)'
SETUP__GIT || FAIL 2 'failed to set up git (see above)'
SETUP__CONFIG || FAIL 3 'failed to set up program configuration (see above)'
} 2>&1 | tee --append "${LOGFILE}"
STATUS "installation complete: $(date)" 2>> "${LOGFILE}"
################################################################################
[[ ${ERRORS} -eq 0 ]] || {
yN 'keep logfile?' \
|| { rm "${LOGFILE}" || ERROR "unable to remove '${LOGFILE}'" }
}
SUCCESS "\n.wryn setup complete; have a nice day :)\n "