-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ez-installrc
46 lines (38 loc) · 1.86 KB
/
.ez-installrc
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
#!/usr/bin/env bash
# Header guard
[[ -z "${GLOBAL_EZ_INSTALL_RC_INCLUDED+x}" ]] &&
readonly GLOBAL_EZ_INSTALL_RC_INCLUDED=1 ||
return 0
# Ez configs
[[ -z "${LOG_SYSLOG+x}" ]] && LOG_SYSLOG=true
[[ -z "${LOG_FILELOG+x}" ]] && LOG_FILELOG=true
[[ -z "${TIMEOUT+x}" ]] && TIMEOUT=15m
[[ -z "${EZ_DOWNLOADS_DIR+x}" ]] && EZ_DOWNLOADS_DIR="${HOME}/Downloads"
[[ -z "${EZ_EDITOR+x}" ]] && EZ_EDITOR="${EDITOR:-vim}"
# Standard configs
[[ -z "${SKIP_CONFIRM+x}" ]] && SKIP_CONFIRM=false
[[ -z "${VERBOSE+x}" ]] && VERBOSE=true
[[ -z "${DEBUG+x}" ]] && DEBUG=false
[[ -z "${LOG_DEBUG_LEVEL+x}" ]] && LOG_DEBUG_LEVEL=4
[[ -z "${ENABLE_COLORS+x}" ]] && ENABLE_COLORS=true
# Install configs
[[ -z "${INSTALL_SKIP_GENERATE+x}" ]] && INSTALL_SKIP_GENERATE=false
# Dot configs
# TODO: Conform to directory ending with forward slashes!
[[ -z "${DOT_BACKUP_LIMIT+x}" ]] && DOT_BACKUP_LIMIT=10
# TODO: Update .dotfilesrc
[[ -z "${DOT_IGNORE_LIST+x}" ]] && DOT_IGNORE_LIST=()
[[ -z "${DOT_LOCAL_DIR+x}" ]] && DOT_LOCAL_DIR="${HOME}"
[[ -z "${DOT_LOCAL_REPO_DIR+x}" ]] && DOT_LOCAL_REPO_DIR="${DOT_LOCAL_DIR}/.dotfiles"
[[ -z "${DOT_BACKUP_DIR+x}" ]] && DOT_BACKUP_DIR="${DOT_LOCAL_DIR}/.dotfiles.bak"
[[ -z "${DOT_BACKUP_DIR_NAME+x}" ]] && DOT_BACKUP_DIR_NAME="$(date +"%Y-%m-%dT%H:%M:%S")_dot_bak"
[[ -z "${DOT_BACKUP_AUTO_CLEAN+x}" ]] && DOT_BACKUP_AUTO_CLEAN=false
# Package configs
[[ -z "${FORCE+x}" ]] && FORCE=false
[[ -z "${RECURSIVE+x}" ]] && RECURSIVE=true
[[ -z "${AS_ROOT+x}" ]] && AS_ROOT=false
[[ ! -d "${EZ_INSTALL_HOME:-}" ]] && EZ_INSTALL_HOME="$(realpath "${BASH_SOURCE%/*}")" && export EZ_INSTALL_HOME
[[ ! -d "${PACKAGE_ROOT_DIR:-}" ]] && PACKAGE_ROOT_DIR="${EZ_INSTALL_HOME}/generate/packages"
[[ ! -d "${LOCAL_PACKAGE_ROOT_DIR:-}" ]] && LOCAL_PACKAGE_ROOT_DIR="${HOME}/.ez-install.d/packages"
# Source local .ez-installrc
[[ -e "${HOME}/.ez-installrc" ]] && source "${HOME}/.ez-installrc"