Refactor the software install workflow
This commit is contained in:
parent
0ebca3e82a
commit
a7be9fa736
25 changed files with 41 additions and 57 deletions
scripts/Common/Scripts
|
@ -12,23 +12,17 @@ begin
|
|||
end
|
||||
|
||||
function runInstaller -V dir -a action
|
||||
source "$dir/config.fish"
|
||||
|
||||
if [ -z "$action" ] || [ "$action" = "install" ]
|
||||
installSW $argv[2..]
|
||||
else if [ "$action" = "configure" ]
|
||||
configureSW $argv[2..]
|
||||
|
||||
source "$dir/config.fish"
|
||||
set -l users (getUsers)
|
||||
runInstaller "configure"
|
||||
|
||||
if not isConfigured || [ "$USER" != (getConfig "valhalla.setupUser.name") ]
|
||||
runInstaller userConfig
|
||||
end
|
||||
|
||||
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
|
||||
if [ "$name" != "$USER" ]
|
||||
runInstaller userConfig "$name"
|
||||
end
|
||||
end
|
||||
else if [ "$action" = "configure" ]
|
||||
configureSW $argv[2..]
|
||||
else if [ "$action" = "userConfig" ]
|
||||
set -l name $argv[2]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue