03faa2
Merge content of initEnvironment.sh into centos-art.sh and remove
@@ -29,8 +29,33 @@
|
|
29
29
|
# $Id: centos-art.sh 70 2010-09-18 04:38:43Z al $
|
30
30
|
# ----------------------------------------------------------------------
|
31
31
|
|
32
|
-
#
|
33
|
-
.
|
32
|
+
# Initizalize centos-art.sh gettext internazionalization.
|
33
|
+
. gettext.sh
|
34
|
+
export TEXTDOMAIN=centos-art.sh
|
35
|
+
export TEXTDOMAINDIR=/home/centos/artwork/trunk/Locales/Scripts/centos-art.sh/
|
36
|
+
|
37
|
+
# Initialize centos-art.sh personal information.
|
38
|
+
export CLINAME='centos-art'
|
39
|
+
export CLIVERSION='1.0 (beta)'
|
40
|
+
|
41
|
+
# Initialize centos-art.sh function scripts.
|
42
|
+
FILES=$(ls /home/centos/artwork/trunk/Scripts/Bash/Functions/{cli,cli_*}.sh)
|
43
|
+
for FILE in $FILES;do
|
44
|
+
if [[ -x $FILE ]];then
|
45
|
+
. $FILE
|
46
|
+
FUNCTION=$(grep '^function ' $FILE | cut -d' ' -f2)
|
47
|
+
export -f $FUNCTION
|
48
|
+
else
|
49
|
+
echo `gettext "The $FILE needs to have execution rights."`
|
50
|
+
exit
|
51
|
+
fi
|
52
|
+
done
|
53
|
+
|
54
|
+
# Unset all variables not considered global in order to start cli
|
55
|
+
# execution with a clean environment.
|
56
|
+
unset FILE
|
57
|
+
unset FILES
|
58
|
+
unset FUNCTION
|
34
59
|
|
35
60
|
# Initialize command line interface.
|
36
61
|
cli "$@"
|
@@ -1,53 +0,0 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# initFunctions.sh -- Initializes environment variables and functions
|
4
|
-
# used by centos-art.sh scripts.
|
5
|
-
#
|
6
|
-
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
7
|
-
#
|
8
|
-
# This program is free software; you can redistribute it and/or
|
9
|
-
# modify it under the terms of the GNU General Public License as
|
10
|
-
# published by the Free Software Foundation; either version 2 of the
|
11
|
-
# License, or (at your option) any later version.
|
12
|
-
#
|
13
|
-
# This program is distributed in the hope that it will be useful, but
|
14
|
-
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
16
|
-
# General Public License for more details.
|
17
|
-
#
|
18
|
-
# You should have received a copy of the GNU General Public License
|
19
|
-
# along with this program; if not, write to the Free Software
|
20
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
21
|
-
# USA.
|
22
|
-
#
|
23
|
-
# ----------------------------------------------------------------------
|
24
|
-
# $Id: initFunctions.sh 80 2010-09-18 06:57:26Z al $
|
25
|
-
# ----------------------------------------------------------------------
|
26
|
-
|
27
|
-
# Initizalize centos-art.sh gettext internazionalization.
|
28
|
-
. gettext.sh
|
29
|
-
export TEXTDOMAIN=centos-art.sh
|
30
|
-
export TEXTDOMAINDIR=/home/centos/artwork/trunk/Locales/Scripts/Bash/
|
31
|
-
|
32
|
-
# Initialize centos-art.sh personal information.
|
33
|
-
export CLINAME='centos-art'
|
34
|
-
export CLIVERSION='1.0 (beta)'
|
35
|
-
|
36
|
-
# Initialize centos-art.sh function scripts.
|
37
|
-
FILES=$(ls /home/centos/artwork/trunk/Scripts/Bash/Functions/{cli,cli_*}.sh)
|
38
|
-
for FILE in $FILES;do
|
39
|
-
if [[ -x $FILE ]];then
|
40
|
-
. $FILE
|
41
|
-
FUNCTION=$(grep '^function ' $FILE | cut -d' ' -f2)
|
42
|
-
export -f $FUNCTION
|
43
|
-
else
|
44
|
-
echo `gettext "The $FILE needs to have execution rights."`
|
45
|
-
exit
|
46
|
-
fi
|
47
|
-
done
|
48
|
-
|
49
|
-
# Unset all variables not considered global in order to start cli
|
50
|
-
# execution with a clean environment.
|
51
|
-
unset FILE
|
52
|
-
unset FILES
|
53
|
-
unset FUNCTION
|