Add --core command line flag
This commit is contained in:
parent
c2744f4a92
commit
7f2edd4adf
18
common.sh
18
common.sh
@ -1,15 +1,16 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
ALL=0
|
||||
WORKSTATION=0
|
||||
EXTRA=0
|
||||
CORE=0
|
||||
DEV=0
|
||||
EXTRA=0
|
||||
WORKSTATION=0
|
||||
|
||||
if [[ "$#" -eq 0 ]]; then
|
||||
ALL=1
|
||||
fi
|
||||
|
||||
options=$(getopt -o awed -l all,workstation,extra,dev -- "$@")
|
||||
options=$(getopt -o acdew -l all,core,dev,extra,workstation -- "$@")
|
||||
[ $? -eq 0 ] || {
|
||||
echo "Incorrect options provided"
|
||||
exit 1
|
||||
@ -21,14 +22,17 @@ while true; do
|
||||
-a | --all)
|
||||
ALL=1
|
||||
;;
|
||||
-w | --workstation)
|
||||
WORKSTATION=1
|
||||
-c | --core)
|
||||
CORE=1
|
||||
;;
|
||||
-d | --dev)
|
||||
DEV=1
|
||||
;;
|
||||
-e | --extra)
|
||||
EXTRA=1
|
||||
;;
|
||||
-d | --dev)
|
||||
DEV=1
|
||||
-w | --workstation)
|
||||
WORKSTATION=1
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
|
@ -120,15 +120,14 @@ function install() {
|
||||
}
|
||||
|
||||
|
||||
mode="${1-terminal}"
|
||||
|
||||
echo $mode
|
||||
install -d "${HOME}/.dotfiles" "./"
|
||||
|
||||
install .oh-my-zsh/themes/oke.zsh-theme
|
||||
install .zshrc
|
||||
install .vimrc
|
||||
install .winfo.sh
|
||||
if [ "${CORE}" -eq 1 ]; then
|
||||
install .oh-my-zsh/themes/oke.zsh-theme
|
||||
install .zshrc
|
||||
install .vimrc
|
||||
install .winfo.sh
|
||||
fi
|
||||
|
||||
if [ "${WORKSTATION}" -eq 1 ]; then
|
||||
install .Xmodmap
|
||||
|
@ -120,7 +120,9 @@ function add_pkg_list() {
|
||||
packages_to_install+=("${list_packages[@]}")
|
||||
}
|
||||
|
||||
add_pkg_list pkgs_system_base
|
||||
if [ "${CORE}" -eq 1 ]; then
|
||||
add_pkg_list pkgs_system_base
|
||||
fi
|
||||
|
||||
if [ "${WORKSTATION}" -eq 1 ]; then
|
||||
add_pkg_list pkgs_system_workstation
|
||||
|
Loading…
x
Reference in New Issue
Block a user