36 lines
816 B
Fish
Executable file
36 lines
816 B
Fish
Executable file
#!/bin/env fish
|
|
begin
|
|
set -l dir (status dirname)
|
|
|
|
function installSW
|
|
end
|
|
|
|
function configureSW
|
|
end
|
|
|
|
function userConfig -a user
|
|
end
|
|
|
|
function runInstaller -V dir -a action
|
|
source "$dir/config.fish"
|
|
|
|
if [ -z "$action" ] || [ "$action" = "install" ]
|
|
installSW $argv[2..]
|
|
runInstaller "configure"
|
|
|
|
if not isConfigured || [ "$USER" != (getConfig "valhalla.setupUser.name") ]
|
|
runInstaller userConfig
|
|
end
|
|
else if [ "$action" = "configure" ]
|
|
configureSW $argv[2..]
|
|
else if [ "$action" = "userConfig" ]
|
|
set -l name $argv[2]
|
|
|
|
if [ -z "$name" ]
|
|
set name "$USER"
|
|
end
|
|
|
|
userConfig "$name" $argv[3..]
|
|
end
|
|
end
|
|
end
|