-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathsetup
executable file
·97 lines (85 loc) · 2.88 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
# this script sets up the SetupHelper service
# This service provides automatic and manual updates for Venus modificaiton packages
#
#### following lines incorporate SetupHelper utilities into this script
# Refer to the SetupHelper ReadMe file for details.
source "/data/SetupHelper/CommonResources"
#### end of lines to include SetupHelper
#### running manually and OK to proceed - prompt for input
if [ $scriptAction == 'NONE' ] ; then
# display innitial message
echo
echo "This package provides support functions and utilities for Venus modificaiton packages"
echo "Packages are automatically reinstalled following a Venus OS update"
echo "Packages may also be automatically updated from GitHub"
echo " or a USB stick"
echo "Prevouslly uninstalled packages can also be installed and configured"
echo " as an option from the menu either from GitHub or from a USB stick"
echo
echo "If internet access is not available, you can manually update/install from a USB stick"
echo "Note: installing from a USB stick disables automatic GitHub updates"
echo
if [ -f "$setupOptionsDir/optionsSet" ]; then
enableReinstall=true
else
enableReinstall=false
fi
response=''
fullPrompt=true
while true; do
if $fullPrompt ; then
echo
echo "Available actions:"
echo " Install and activate (i)"
if $enableReinstall ; then
echo " Reinstall (r) based on options provided at last install"
fi
echo " Uninstall (u) and restores all files to stock"
echo " Quit (q) without further action"
echo " Display setup log (s) outputs the last 100 lines of the log"
echo
echo " Manually install packages from GitHub or USB stick (p)"
echo
fullPrompt=false
fi
/bin/echo -n "Choose an action from the list above: "
read response
case $response in
[iI]*)
scriptAction='INSTALL'
break;;
[rR]*)
if $enableReinstall ; then
scriptAction='INSTALL'
break
fi
;;
[uU]*)
scriptAction='UNINSTALL'
break
;;
[qQ]*)
exit
;;
[sS]*)
displayLog $setupLogFile
;;
[pP]*)
"$scriptDir/packageInstaller"
fullPrompt=true
;;
*)
esac
done
# next step is to install
scriptAction='INSTALL'
fi
if [ $scriptAction == 'INSTALL' ] ; then
# installService $packageName
fi
if [ $scriptAction == 'UNINSTALL' ] ; then
removeService $packageName
fi
# thats all folks - SCRIPT EXITS INSIDE THE FUNCTION
endScript