2024-07-13 16:36:24 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
begin
|
2024-07-20 01:50:38 +00:00
|
|
|
set -l dir (status dirname)
|
|
|
|
|
2024-07-13 16:36:24 +00:00
|
|
|
function installSW
|
|
|
|
end
|
|
|
|
|
|
|
|
function configureSW
|
|
|
|
end
|
|
|
|
|
2024-07-20 01:50:38 +00:00
|
|
|
function userConfig -a user
|
|
|
|
end
|
|
|
|
|
|
|
|
function runInstaller -V dir -a action
|
2024-07-13 16:36:24 +00:00
|
|
|
if [ -z "$action" ] || [ "$action" = "install" ]
|
2024-07-15 11:56:27 +00:00
|
|
|
installSW $argv[2..]
|
2024-07-14 08:10:04 +00:00
|
|
|
else if [ "$action" = "configure" ]
|
2024-07-20 01:32:53 +00:00
|
|
|
configureSW $argv[2..]
|
2024-07-20 01:50:38 +00:00
|
|
|
|
|
|
|
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..]
|
2024-07-13 16:36:24 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|