ref(install-script): separate targets from main script
This commit is contained in:
parent
26b3f8f025
commit
a3f7d765e9
22
TARGETS.sh
Normal file
22
TARGETS.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
declare -r -A TARGETS=(
|
||||||
|
["colors"]=".config/terminal-colors.d"
|
||||||
|
["tmux"]=".config/tmux .tmux .config/systemd/user/tmux.service"
|
||||||
|
["bash"]=".config/bash .bashrc .profile %tmux %colors"
|
||||||
|
["zsh"]="%bash .config/zsh .zshenv .inputrc"
|
||||||
|
["alacritty"]=".config/alacritty"
|
||||||
|
["nvim"]=".config/nvim .editorconfig .local/bin/vim_askpass_helper"
|
||||||
|
["ssh"]=""
|
||||||
|
["less"]=".lesskey"
|
||||||
|
["git"]=".config/git"
|
||||||
|
["ranger"]=".config/ranger"
|
||||||
|
["gpg"]=""
|
||||||
|
["i3"]=".xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/wifi .local/bin/bluetooth .local/bin/i3_switch_workspace.sh"
|
||||||
|
["bat"]=".config/bat"
|
||||||
|
["font"]=""
|
||||||
|
["termux"]=".termux"
|
||||||
|
["arch"]=""
|
||||||
|
["psql"]=".psqlrc"
|
||||||
|
["docker"]=".docker/cli-plugins"
|
||||||
|
["ipython"]=".ipython/profile_default/ipython_config.py"
|
||||||
|
["gdb"]=".config/gdb"
|
||||||
|
)
|
||||||
26
install
26
install
@ -8,29 +8,6 @@ declare -r DOTFILES_ROOT="$PWD"
|
|||||||
declare -xr SUB="$DOTFILES_ROOT/home/user"
|
declare -xr SUB="$DOTFILES_ROOT/home/user"
|
||||||
|
|
||||||
|
|
||||||
declare -r -A TARGETS=(
|
|
||||||
["colors"]=".config/terminal-colors.d"
|
|
||||||
["tmux"]=".config/tmux .tmux .config/systemd/user/tmux.service"
|
|
||||||
["bash"]=".config/bash .bashrc .profile %tmux %colors"
|
|
||||||
["zsh"]="%bash .config/zsh .zshenv .inputrc"
|
|
||||||
["alacritty"]=".config/alacritty"
|
|
||||||
["nvim"]=".config/nvim .editorconfig .local/bin/vim_askpass_helper"
|
|
||||||
["ssh"]=""
|
|
||||||
["less"]=".lesskey"
|
|
||||||
["git"]=".config/git"
|
|
||||||
["ranger"]=".config/ranger"
|
|
||||||
["gpg"]=""
|
|
||||||
["i3"]=".xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/wifi .local/bin/bluetooth .local/bin/i3_switch_workspace.sh"
|
|
||||||
["bat"]=".config/bat"
|
|
||||||
["font"]=""
|
|
||||||
["termux"]=".termux"
|
|
||||||
["arch"]=""
|
|
||||||
["psql"]=".psqlrc"
|
|
||||||
["docker"]=".docker/cli-plugins"
|
|
||||||
["ipython"]=".ipython/profile_default/ipython_config.py"
|
|
||||||
["gdb"]=".config/gdb"
|
|
||||||
)
|
|
||||||
|
|
||||||
_die() {
|
_die() {
|
||||||
echo "$0: $1" >&2
|
echo "$0: $1" >&2
|
||||||
exit $2
|
exit $2
|
||||||
@ -39,6 +16,9 @@ _die() {
|
|||||||
test "$0" = "./install" || _die "Error: Please, run this file from root of dotfiles, like this './install.sh TARGET" 1
|
test "$0" = "./install" || _die "Error: Please, run this file from root of dotfiles, like this './install.sh TARGET" 1
|
||||||
|
|
||||||
|
|
||||||
|
source "$DOTFILES_ROOT/TARGETS.sh"
|
||||||
|
|
||||||
|
|
||||||
_link_files_in_sandbox() {
|
_link_files_in_sandbox() {
|
||||||
local targetfile
|
local targetfile
|
||||||
for targetfile in "$@"
|
for targetfile in "$@"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user