-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·64 lines (44 loc) · 1.14 KB
/
install.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -e
# Install dotfiles
#
# Usage:
# $ ./install.sh
#
# Options:
# BRANCH_NAME=other-branch-than-main # Default is `main`
# REINSTALL=true # Attempts to reinstall the packages, default is `false`
# VERBOSE=true # Show all the executed commands, default is `false`
# ==============================================================================
function main() {
[ -z "$SYSTEM_DIST" ] && eval $(source "$HOME/.local/bin/detect-operating-system.sh")
install-prerequisites
install-dotfiles
}
function install-prerequisites {
# TODO: install bitwarden, bitwarden-cli, chezmoi
:
}
function get-dotfiles-configuration {
# TODO: bw-cli
:
}
function install-dotfiles {
# TODO: sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply $GITHUB_ORG # "make-ops-tools"
:
}
function get-script-from {
# TODO: curl & wget
:
}
function is-arg-true() {
if [[ "$1" =~ ^(true|yes|y|on|1|TRUE|YES|Y|ON)$ ]]; then
return 0
else
return 1
fi
}
# ==============================================================================
is-arg-true "$VERBOSE" && set -x
main $*
exit 0