-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathINSTALL
More file actions
31 lines (21 loc) · 1.04 KB
/
INSTALL
File metadata and controls
31 lines (21 loc) · 1.04 KB
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
== Install ScriptHelper system-wide
Copy content of the tarball in a directory (/usr/lib/ScriptHelper/ for example).
Copy the file ScriptHelper.conf in /etc/ and edit it to change the value of
SCRIPT_HELPER_DIRECTORY variable, which has to be set to the path where you
put ScriptHelper (here: /usr/lib/ScriptHelper)
== Use ScriptHelper in a specific project
If you don't want to install ScriptHelper on the system, and only use
ScriptHelper for your script, you have to set the SCRIPT_HELPER_DIRECTORY
variable, before source any files of ScriptHelper.
Here is an example, assumed that you put ScriptHelper in the './lib/'
directory :
# simple code to show how to use ScriptHelper from a script
# without install it
SCRIPT_HELPER_DIRECTORY='./lib'
# load ScriptHelper libraries
source ${SCRIPT_HELPER_DIRECTORY}/ask.lib.sh
source ${SCRIPT_HELPER_DIRECTORY}/ask.lib.sh
ASK --yesno "Does it work [Yes] ?" result 'Y'
MESSAGE "the result is '${result}'"
return 0
This script whill ask "Does it work [Yes] ?" and print your answer :-)