Option to skip homes-private

This commit is contained in:
Kujiu 2023-09-03 00:44:13 +02:00
parent 853ada5444
commit fa3f668f6b
Signed by: kujiu
GPG key ID: ABBB2CAC6855599F

View file

@ -1,7 +1,7 @@
#!/usr/bin/env fish #!/usr/bin/env fish
function update-homes 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 if set --query _flag_help
echo "Update home's configuration" echo "Update home's configuration"
@ -21,6 +21,9 @@ function update-homes
echo " -r --root" echo " -r --root"
echo " Update root part" echo " Update root part"
echo echo
echo " -s --skip-secrets"
echo " Skip homes-private part"
echo
echo " -R --remove" echo " -R --remove"
echo " Remove old configuration" echo " Remove old configuration"
echo echo
@ -47,18 +50,20 @@ function update-homes
./update-home.fish $options ./update-home.fish $options
popd popd
pushd ~/homes-private if not set --query _flag_skip-secrets
if set --query _flag_git pushd ~/homes-private
gitpr if set --query _flag_git
end gitpr
end
set -f options "" set -f options ""
if set --query _flag_private if set --query _flag_private
set -f options "--private" set -f options "--private"
end
if set --query _flag_root
set -f options "$options --root"
end
./update-private.fish $options
popd
end end
if set --query _flag_root
set -f options "$options --root"
end
./update-private.fish $options
popd
end end