Fix configuration target
This commit is contained in:
parent
0a9d8e2c16
commit
64c27aae02
1 changed files with 4 additions and 1 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue