-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathsetup
executable file
·79 lines (70 loc) · 3.33 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# this script provides the following modificaitons:
# move Settings and Notifications to the top of the list man page
# hides the Tiles Overview
# replaces the Mobile Overview with an enhanced version
#
# each of these modifications is optional and can be selected
# at install time
#
# Note: both Enhanced Mobile Overview and hiding the Tile Overview modify main.qml
# so order of operations is important.
# enhanced generator control and display is part of GuiMods now so GeneratorConnector must not be installed also
#### following lines incorporate helper resources into this script
pkgDir=$( dirname $0 )
pkgName=$( basename $pkgDir )
pkgRoot=$( dirname $pkgDir )
if [ -e "$pkgDir/HelperResources/IncludeHelpers" ]; then
source "$pkgDir/HelperResources/IncludeHelpers"
elif [ -e "$pkgRoot/SetupHelper/HelperResources/IncludeHelpers" ]; then
source "$pkgRoot/SetupHelper/HelperResources/IncludeHelpers"
else
echo "$pkgName: helper resources not found - can't continue" | tee -a "/data/log/SetupHelper"
exit 1
fi
#### end of lines to include helper resources
#### running manually and OK to proceed - prompt for input
if [ $scriptAction == 'NONE' ] ; then
# display innitial message
echo
echo "This package modifies the GUI in several areas"
echo "Refer to the ReadMe for an explaination of each modification"
echo "Installation enables all modificaions by default"
echo " however each modificaiton can be enabled/disabled in the Display * language / GuiMods menus"
standardActionPrompt
fi
#### installing
if [ $scriptAction == 'INSTALL' ] ; then
# insure ExtTransferSwitch is uninstalled since its functionalty is now part of GuiMods
if [ -f "$installedVersionPrefix""ExtTransferSwitch" ]; then
logMessage "uninstalling the ExtTransferSwitch - GuiMods incorporates all it's features"
if [ -e "/data/ExtTransferSwitch/setup" ]; then
"/data/ExtTransferSwitch/setup" "uninstall" "auto" "deferReboot" "deferGuiRestart"
else
logMessage "WARNING can't uninstall ExtTransferSwitch - no package or no setup script"
fi
if [ -e "/data/settupOptions/ExtTransferSwitch" ]; then
touch "/data/settupOptions/ExtTransferSwitch/DO_NOT_AUTO_INSTALL"
touch "/data/settupOptions/ExtTransferSwitch/DO_NOT_AUTO_ADD"
touch "/data/settupOptions/ExtTransferSwitch/FORCE_REMOVE"
fi
fi
# insure GeneratorConnector is uninstalled since its functionalty is now part of GuiMods
if [ -f "$installedVersionPrefix""GeneratorConnector" ]; then
logMessage "uninstalling the GeneratorConnector - GuiMods incorporates all it's features and more"
if [ -e "/data/GeneratorConnector/setup" ]; then
"/data/GeneratorConnector/setup" "uninstall" "auto" "deferReboot" "deferGuiRestart"
else
logMessage "WARNING can't uninstall GeneratorConnector - no package or no setup script"
fi
if [ -e "/data/settupOptions/GeneratorConnector" ]; then
touch "/data/settupOptions/GeneratorConnector/DO_NOT_AUTO_INSTALL"
touch "/data/settupOptions/GeneratorConnector/DO_NOT_AUTO_ADD"
touch "/data/settupOptions/GeneratorConnector/FORCE_REMOVE"
fi
fi
fi
# endScript handles normal install and all uninstall tasks
# endScript will install or uninstall all files and dBus settings (package has no services)
# thats all folks - SCRIPT EXITS INSIDE THE FUNCTION
endScript 'INSTALL_FILES' 'INSTALL_SERVICES' 'ADD_DBUS_SETTINGS'