Allow marking software as installed

This commit is contained in:
Manuel Thalmann 2024-07-20 01:21:25 +02:00
parent 501aa51876
commit a2848a3965

View file

@ -1,5 +1,11 @@
#!/bin/env fish
begin
set -a installed
function getSWName
echo "PortValhalla"
end
function installSW
end
@ -8,9 +14,16 @@ begin
function runInstaller -a action
if [ -z "$action" ] || [ "$action" = "install" ]
set -a installed (getSWName)
installSW $argv[2..]
else if [ "$action" = "configure" ]
configureSW $argv[2..]
if contains (getSWName) $installed
configureSW $argv[2..]
else
printf %s%s\n \
"$(tput setaf 3)Warning: $(tput sgr0)" \
"$(getSWName) does not seem to be installed -- Skipping"
end
end
end
end