Allow marking software as installed
This commit is contained in:
parent
82b6fa594d
commit
2eb56e20f1
1 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/env fish
|
#!/bin/env fish
|
||||||
begin
|
begin
|
||||||
|
set -a installed
|
||||||
|
|
||||||
|
function getSWName
|
||||||
|
echo "PortValhalla"
|
||||||
|
end
|
||||||
|
|
||||||
function installSW
|
function installSW
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -8,9 +14,16 @@ begin
|
||||||
|
|
||||||
function runInstaller -a action
|
function runInstaller -a action
|
||||||
if [ -z "$action" ] || [ "$action" = "install" ]
|
if [ -z "$action" ] || [ "$action" = "install" ]
|
||||||
|
set -a installed (getSWName)
|
||||||
installSW $argv[2..]
|
installSW $argv[2..]
|
||||||
else if [ "$action" = "configure" ]
|
else if [ "$action" = "configure" ]
|
||||||
|
if contains (getSWName) $installed
|
||||||
configureSW $argv[2..]
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue