User accessible apps list

This commit is contained in:
Bob Mottram 2016-09-30 17:30:32 +01:00
parent ce4afbf5a1
commit 615aaf9b1f
2 changed files with 54 additions and 36 deletions

View File

@ -69,7 +69,14 @@ function install_final {
fi
}
function update_installed_apps_list {
cat $COMPLETION_FILE | grep "install_" > /usr/share/${PROJECT_NAME}/installed.txt
}
function setup_final {
function_check update_installed_apps_list
update_installed_apps_list
function_check install_tripwire
install_tripwire

View File

@ -64,6 +64,15 @@ function app_is_installed {
return
fi
if [ -f /usr/share/${PROJECT_NAME}/installed.txt ]; then
if ! grep -Fxq "install_${app_name}" /usr/share/${PROJECT_NAME}/installed.txt; then
echo "0"
else
echo "1"
fi
return
fi
if ! grep -Fxq "install_${app_name}" $COMPLETION_FILE; then
echo "0"
else
@ -206,6 +215,7 @@ function remove_apps {
fi
app_index=$[app_index+1]
done
update_installed_apps_list
}
function install_apps {
@ -228,6 +238,7 @@ function install_apps {
fi
app_index=$[app_index+1]
done
update_installed_apps_list
}
# NOTE: deliberately no exit 0