From 2eb56e20f117b70c23b7c9f84a52b486936ba580 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 20 Jul 2024 01:21:25 +0200 Subject: [PATCH] Allow marking software as installed --- scripts/Common/Scripts/software.fish | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Scripts/software.fish b/scripts/Common/Scripts/software.fish index 6c3ae551..35a3fc3b 100644 --- a/scripts/Common/Scripts/software.fish +++ b/scripts/Common/Scripts/software.fish @@ -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