🚸 Improve dot script options
This commit is contained in:
parent
c45e8c2528
commit
ca12143baa
1 changed files with 14 additions and 18 deletions
|
@ -2,10 +2,9 @@
|
||||||
|
|
||||||
set -q DOT || set -gx DOT "$HOME/dotfiles"
|
set -q DOT || set -gx DOT "$HOME/dotfiles"
|
||||||
|
|
||||||
set -g yes_to_all false
|
set -g set_prefs false
|
||||||
set -g set_prefs true
|
set -g link_files false
|
||||||
set -g link_files true
|
set -g run_installers false
|
||||||
set -g run_installers true
|
|
||||||
|
|
||||||
source "$DOT/script/utils.fish"
|
source "$DOT/script/utils.fish"
|
||||||
|
|
||||||
|
@ -114,9 +113,7 @@ function install_dotfiles
|
||||||
set -g overwrite_all false
|
set -g overwrite_all false
|
||||||
set -g backup_all false
|
set -g backup_all false
|
||||||
|
|
||||||
if set -q yes_to_all && $yes_to_all
|
if set -q _flag_s
|
||||||
set skip_all true
|
|
||||||
else if set -q _flag_s
|
|
||||||
set skip_all true
|
set skip_all true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -140,25 +137,24 @@ end
|
||||||
# Main #
|
# Main #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
argparse y/yes-to-all s/skip o/overwrite b/backup p/only-prefs i/only-installers l/only-link -- $argv
|
argparse s/skip o/overwrite b/backup p/only-prefs i/only-installers l/only-link -- $argv
|
||||||
|
|
||||||
if set -q _flag_y
|
|
||||||
set yes_to_all true
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_p
|
if set -q _flag_p
|
||||||
set run_installers false
|
set set_prefs true
|
||||||
set link_files false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if set -q _flag_i
|
if set -q _flag_i
|
||||||
set set_prefs false
|
set run_installers true
|
||||||
set link_files false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if set -q _flag_l
|
if set -q _flag_l
|
||||||
set run_installers false
|
set link_files true
|
||||||
set set_prefs false
|
end
|
||||||
|
|
||||||
|
if ! set -q _flag_p && ! set -q _flag_i && ! set -q _flag_l
|
||||||
|
set set_prefs true
|
||||||
|
set run_installers true
|
||||||
|
set link_files true
|
||||||
end
|
end
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
Loading…
Reference in a new issue