Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
40939070
Commit
40939070
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Checking whether another app is required during install
parent
443f8137
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-utils-selector
+30
-0
30 additions, 0 deletions
src/freedombone-utils-selector
with
30 additions
and
0 deletions
src/freedombone-utils-selector
+
30
−
0
View file @
40939070
...
...
@@ -241,6 +241,33 @@ function app_is_installed {
fi
}
function
other_app_required
{
# is another app required before the install of this one?
app_name
=
"
$1
"
app_filename
=
"/usr/share/
${
PROJECT_NAME
}
/apps/
${
PROJECT_NAME
}
-app-
${
app_name
}
"
if
[
!
-f
"
$app_filename
"
]
;
then
echo
''
return
fi
if
!
grep
-q
'REQUIRES_APP='
"
$app_filename
"
;
then
echo
''
return
fi
grep
'REQUIRES_APP='
"
$app_filename
"
|
head
-n
1 |
awk
-F
'='
'{print $2}'
}
function
check_other_app_required
{
app_name
=
"
$1
"
apprequired
=
$(
other_app_required
"
${
app_name
}
"
)
if
[
"
$apprequired
"
]
;
then
if
[[
$(
app_is_installed
"
${
apprequired
}
"
)
!=
"1"
]]
;
then
echo
$"
${
apprequired
}
needs to be installed before you can install
${
app_name
}
"
exit
61
fi
fi
}
function
install_completed_remove_progress_screen
{
local_hostname
=
$(
grep
'host-name'
/etc/avahi/avahi-daemon.conf |
awk
-F
'='
'{print $2}'
)
.local
webadmin_install_dir
=
"/var/www/
${
local_hostname
}
/htdocs/admin"
...
...
@@ -696,6 +723,7 @@ function install_apps {
"upgrade_
${
a
}
"
echo
$"
${
a
}
was upgraded from interactive"
else
check_other_app_required
"
${
a
}
"
echo
$"Installing application from interactive:
${
a
}
"
APP_INSTALLED
=
function_check app_being_added_indicator
...
...
@@ -730,6 +758,7 @@ function install_apps {
"upgrade_
${
a
}
"
echo
$"
${
a
}
was upgraded"
else
check_other_app_required
"
${
a
}
"
echo
$"Installing application:
${
a
}
"
APP_INSTALLED
=
function_check app_being_added_indicator
...
...
@@ -753,6 +782,7 @@ function install_apps {
APP_INSTALLED_SUCCESS
=
echo
$"
${
a
}
was not installed"
fi
fi
else
echo
$"
${
a
}
has been removed and so will not be reinstalled"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment