Fix configuration target

This commit is contained in:
Manuel Thalmann 2024-07-20 01:43:53 +02:00
parent c3a2c0f34c
commit 0bb58e0ae7

View file

@ -10,17 +10,20 @@ begin
function configureSW -S -V dir -a scope name function configureSW -S -V dir -a scope name
source "$dir/../../Scripts/config.fish" source "$dir/../../Scripts/config.fish"
set -l root set -l root
set -l user
set -l configArgs set -l configArgs
function setConfig function setConfig
sudo git config $configArgs $argv sudo -u "$user" git config $configArgs $argv
end end
if [ -z "$scope" ] || [ "$scope" = "system" ] if [ -z "$scope" ] || [ "$scope" = "system" ]
set root "valhalla" set root "valhalla"
set user "root"
set configArgs "--system" set configArgs "--system"
else else
set root "valhalla.users.$name" set root "valhalla.users.$name"
set user "$name"
set configArgs "--global" set configArgs "--global"
set -l displayName "$root.displayName" set -l displayName "$root.displayName"
set -l mailAddress "$root.mailAddress" set -l mailAddress "$root.mailAddress"