PortValhalla/scripts/Common/Scripts/software.fish

36 lines
820 B
Fish

#!/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
if [ -z "$action" ] || [ "$action" = "install" ]
installSW $argv[2..]
else if [ "$action" = "configure" ]
configureSW $argv[2..]
source "$dir/config.fish"
set -l users (getUsers)
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
runInstaller userConfig "$name"
end
else if [ "$action" = "userConfig" ]
set -l name $argv[2]
if [ -z "$name" ]
set name "$USER"
end
userConfig "$name" $argv[3..]
end
end
end