Option to skip homes-private
This commit is contained in:
parent
853ada5444
commit
fa3f668f6b
1 changed files with 18 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
function update-homes
|
||||
argparse 'h/help' 'g/git' 'd/desktop' 'p/private' 'r/root' 'R/remove' -- $argv
|
||||
argparse 'h/help' 'g/git' 'd/desktop' 'p/private' 'r/root' 'R/remove' 's/skip-secrets' -- $argv
|
||||
|
||||
if set --query _flag_help
|
||||
echo "Update home's configuration"
|
||||
|
@ -21,6 +21,9 @@ function update-homes
|
|||
echo " -r --root"
|
||||
echo " Update root part"
|
||||
echo
|
||||
echo " -s --skip-secrets"
|
||||
echo " Skip homes-private part"
|
||||
echo
|
||||
echo " -R --remove"
|
||||
echo " Remove old configuration"
|
||||
echo
|
||||
|
@ -47,18 +50,20 @@ function update-homes
|
|||
./update-home.fish $options
|
||||
popd
|
||||
|
||||
pushd ~/homes-private
|
||||
if set --query _flag_git
|
||||
gitpr
|
||||
end
|
||||
if not set --query _flag_skip-secrets
|
||||
pushd ~/homes-private
|
||||
if set --query _flag_git
|
||||
gitpr
|
||||
end
|
||||
|
||||
set -f options ""
|
||||
if set --query _flag_private
|
||||
set -f options "--private"
|
||||
set -f options ""
|
||||
if set --query _flag_private
|
||||
set -f options "--private"
|
||||
end
|
||||
if set --query _flag_root
|
||||
set -f options "$options --root"
|
||||
end
|
||||
./update-private.fish $options
|
||||
popd
|
||||
end
|
||||
if set --query _flag_root
|
||||
set -f options "$options --root"
|
||||
end
|
||||
./update-private.fish $options
|
||||
popd
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue