Add a function for declaring software dependencies
This commit is contained in:
parent
84c05480a6
commit
75e0f0e419
2 changed files with 20 additions and 2 deletions
|
@ -21,6 +21,9 @@ begin
|
||||||
sudo systemctl enable --global surface-dtx-userd.service
|
sudo systemctl enable --global surface-dtx-userd.service
|
||||||
end
|
end
|
||||||
|
|
||||||
runInstaller --force $argv
|
function installSWDependencies
|
||||||
fish "$dir/../Surface/main.fish" $argv
|
fish "$dir/../Surface/main.fish" $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
runInstaller --force $argv
|
||||||
|
end
|
||||||
|
|
|
@ -9,7 +9,8 @@ begin
|
||||||
set -l actions \
|
set -l actions \
|
||||||
install installSW \
|
install installSW \
|
||||||
configure configureSW \
|
configure configureSW \
|
||||||
userConfig userConfig
|
userConfig userConfig \
|
||||||
|
dependencies installSWDependencies
|
||||||
|
|
||||||
set -a actions $backupActions
|
set -a actions $backupActions
|
||||||
|
|
||||||
|
@ -113,6 +114,8 @@ begin
|
||||||
set -l name $_flag_name
|
set -l name $_flag_name
|
||||||
set -l action $_flag_action
|
set -l action $_flag_action
|
||||||
set -l args $_flag_force --name "$name"
|
set -l args $_flag_force --name "$name"
|
||||||
|
set -l dependencyFunction "installSWDependencies"
|
||||||
|
set -l installDependencies
|
||||||
source "$dir/settings.fish"
|
source "$dir/settings.fish"
|
||||||
|
|
||||||
if [ -n "$_flag_force" ]
|
if [ -n "$_flag_force" ]
|
||||||
|
@ -121,6 +124,12 @@ begin
|
||||||
set force false
|
set force false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if functions -q "$dependencyFunction"
|
||||||
|
set installDependencies __runSosftwareDependencyInstaller
|
||||||
|
functions -c "$dependencyFunction" "$installDependencies"
|
||||||
|
functions -e "$dependencyFunction"
|
||||||
|
end
|
||||||
|
|
||||||
if isProgramEnabled $args || $force
|
if isProgramEnabled $args || $force
|
||||||
set install true
|
set install true
|
||||||
else
|
else
|
||||||
|
@ -208,5 +217,11 @@ begin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if [ -n "$installDependencies" ]
|
||||||
|
"$installDependencies" --action "$action" $args $argv
|
||||||
|
functions -c "$installDependencies" "$dependencyFunction"
|
||||||
|
functions -e "$installDependencies"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue