From fa3f668f6b9b90164c623687b964d31d2797ba4c Mon Sep 17 00:00:00 2001 From: "kujiu (@uberwald)" Date: Sun, 3 Sep 2023 00:44:13 +0200 Subject: [PATCH] Option to skip homes-private --- .../.config/fish/functions/update-homes.fish | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/common/.config/fish/functions/update-homes.fish b/common/.config/fish/functions/update-homes.fish index e3a155d..34437b9 100644 --- a/common/.config/fish/functions/update-homes.fish +++ b/common/.config/fish/functions/update-homes.fish @@ -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