Create addremove script

This commit is contained in:
Bob Mottram 2017-06-23 10:53:25 +01:00
parent 19897c5eb0
commit 76b24ec257
4 changed files with 11 additions and 3 deletions

View File

@ -64,6 +64,7 @@ uninstall:
rm -rf /etc/${APP} rm -rf /etc/${APP}
rm -f ${PREFIX}/bin/control rm -f ${PREFIX}/bin/control
rm -f ${PREFIX}/bin/controluser rm -f ${PREFIX}/bin/controluser
rm -f ${PREFIX}/bin/addremove
bash -c "./translate uninstall" bash -c "./translate uninstall"
clean: clean:
rm -f \#* \.#* debian/*.substvars debian/*.log src/*~ rm -f \#* \.#* debian/*.substvars debian/*.log src/*~

View File

@ -38,11 +38,13 @@ if [ -f /usr/bin/${PROJECT_NAME} ]; then
PROJECT_INSTALL_DIR=/usr/bin PROJECT_INSTALL_DIR=/usr/bin
fi fi
source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg
# Start including files
source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
for f in $UTILS_FILES for f in $UTILS_FILES
do do
@ -55,6 +57,8 @@ do
source $f source $f
done done
# End including files
function mark_unselected_apps_as_removed { function mark_unselected_apps_as_removed {
# Initially mark the apps not chosen on first install as being removed # Initially mark the apps not chosen on first install as being removed
# otherwise they may be automatically installed on the next update # otherwise they may be automatically installed on the next update

View File

@ -2135,7 +2135,7 @@ function menu_top_level {
4) show_firewall;; 4) show_firewall;;
5) reset_tripwire;; 5) reset_tripwire;;
6) menu_app_settings;; 6) menu_app_settings;;
7) ${PROJECT_NAME}-addremove 7) /usr/local/bin/addremove
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
any_key any_key
fi fi

View File

@ -34,12 +34,15 @@ cat /usr/local/bin/${PROJECT_NAME}-vars /usr/share/${PROJECT_NAME}/utils/${PROJE
cat /tmp/includescripts /usr/local/bin/freedombone-controlpanel > /usr/local/bin/control cat /tmp/includescripts /usr/local/bin/freedombone-controlpanel > /usr/local/bin/control
cat /tmp/includescripts /usr/local/bin/freedombone-controlpanel-user > /usr/local/bin/controluser cat /tmp/includescripts /usr/local/bin/freedombone-controlpanel-user > /usr/local/bin/controluser
cat /tmp/includescripts /usr/local/bin/freedombone-addremove > /usr/local/bin/addremove
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/control sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/control
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/controluser sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/controluser
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/addremove
chmod +x /usr/local/bin/control chmod +x /usr/local/bin/control
chmod +x /usr/local/bin/controluser chmod +x /usr/local/bin/controluser
chmod +x /usr/local/bin/addremove
rm /tmp/includescripts rm /tmp/includescripts