Function to upgrade apps
This commit is contained in:
parent
5e7eefa2de
commit
835c14d928
|
@ -259,6 +259,7 @@ function backup_apps {
|
||||||
do
|
do
|
||||||
app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
|
app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
|
||||||
if [[ $(item_in_array ${app_name} ${APPS_COMPLETED[@]}) != 0 ]]; then
|
if [[ $(item_in_array ${app_name} ${APPS_COMPLETED[@]}) != 0 ]]; then
|
||||||
|
function_check app_is_installed
|
||||||
if [[ "$(app_is_installed $a)" == "1" ]]; then
|
if [[ "$(app_is_installed $a)" == "1" ]]; then
|
||||||
APPS_COMPLETED+=("${app_name}")
|
APPS_COMPLETED+=("${app_name}")
|
||||||
function_check backup_local_${app_name}
|
function_check backup_local_${app_name}
|
||||||
|
|
|
@ -324,6 +324,25 @@ function setup_web {
|
||||||
install_web_server_access_control
|
install_web_server_access_control
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function upgrade_apps {
|
||||||
|
APPS_COMPLETED=()
|
||||||
|
FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||||
|
|
||||||
|
# for all the app scripts
|
||||||
|
for filename in $FILES
|
||||||
|
do
|
||||||
|
app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}')
|
||||||
|
if [[ $(item_in_array ${app_name} ${APPS_COMPLETED[@]}) != 0 ]]; then
|
||||||
|
function_check app_is_installed
|
||||||
|
if [[ "$(app_is_installed $a)" == "1" ]]; then
|
||||||
|
APPS_COMPLETED+=("${app_name}")
|
||||||
|
function_check upgrade_${app_name}
|
||||||
|
upgrade_${app_name}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
function setup_apps {
|
function setup_apps {
|
||||||
function_check choose_apps_for_variant
|
function_check choose_apps_for_variant
|
||||||
choose_apps_for_variant "$SYSTEM_TYPE"
|
choose_apps_for_variant "$SYSTEM_TYPE"
|
||||||
|
@ -335,6 +354,9 @@ function setup_apps {
|
||||||
list_chosen_apps
|
list_chosen_apps
|
||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
|
function_check upgrade_apps
|
||||||
|
upgrade_apps
|
||||||
|
|
||||||
function_check install_apps
|
function_check install_apps
|
||||||
install_apps
|
install_apps
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue