4b8e06
Update verify functionality:
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
function verify {
|
28
28
|
|
29
|
-
# Define global
|
29
|
+
# Define global variables.
|
30
30
|
|
31
31
|
# Define command-line interface.
|
32
32
|
verify_getActions
|
@@ -45,9 +45,34 @@ function verify_doEnvironment {
|
|
45
45
|
INFO[3]="`gettext "Default directory used to retrive translated messages"`"
|
46
46
|
INFO[4]="`gettext "Default locale information"`"
|
47
47
|
|
48
|
+
# Define short options we want to support.
|
49
|
+
ARGSS=""
|
50
|
+
|
51
|
+
# Define long options we want to support.
|
52
|
+
ARGSL="filter:"
|
53
|
+
|
54
|
+
# Parse arguments using getopt(1) command parser.
|
55
|
+
cli_doParseArguments
|
56
|
+
|
57
|
+
# Reset positional parameters using output from (getopt) argument
|
58
|
+
# parser.
|
59
|
+
eval set -- "$ARGUMENTS"
|
60
|
+
|
61
|
+
# Define action to take for each option passed.
|
62
|
+
while true; do
|
63
|
+
case "$1" in
|
64
|
+
--filter )
|
65
|
+
REGEX="$2"
|
66
|
+
shift 2
|
67
|
+
;;
|
68
|
+
* )
|
69
|
+
break
|
70
|
+
esac
|
71
|
+
done
|
72
|
+
|
48
73
|
until [[ $COUNT -eq ${#VARS[*]} ]];do
|
49
74
|
|
50
|
-
# Let
|
75
|
+
# Let user to reduce output using regular expression as
|
51
76
|
# reference.
|
52
77
|
if [[ ${VARS[$COUNT]} =~ $REGEX ]];then
|
53
78
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
function verify_getActions {
|
28
28
|
|
29
|
-
case $
|
29
|
+
case $ACTIONNAM in
|
30
30
|
|
31
31
|
--packages )
|
32
32
|
verify_doPackages
|
@@ -39,11 +39,11 @@ function verify_pathToCli {
|
|
39
39
|
|
40
40
|
# Define files required by the centos-art.sh script command line
|
41
41
|
# interface.
|
42
|
-
REPOFILES
|
42
|
+
REPOFILES[0]=${REPODIRS[2]}/centos-art.sh
|
43
43
|
|
44
44
|
# Define symbolic links required by the centos-art.sh script
|
45
45
|
# command line interface.
|
46
|
-
REPOLINKS
|
46
|
+
REPOLINKS[0]=${REPODIRS[1]}/centos-art
|
47
47
|
|
48
48
|
# Check defined directories.
|
49
49
|
for FILE in "${REPODIRS[@]}";do
|
@@ -40,10 +40,10 @@ function verify_pathToFonts {
|
|
40
40
|
REPODIRS[1]=/home/centos/artwork/trunk/Identity/Fonts/Ttf
|
41
41
|
|
42
42
|
# Define font related files.
|
43
|
-
REPOFILES
|
43
|
+
REPOFILES[0]=${REPODIRS[1]}/denmark.ttf
|
44
44
|
|
45
45
|
# Define font related symbolic links.
|
46
|
-
REPOLINKS
|
46
|
+
REPOLINKS[0]=${REPODIRS[0]}/denmark.ttf
|
47
47
|
|
48
48
|
# Check defined directories.
|
49
49
|
for FILE in "${REPODIRS[@]}";do
|
@@ -40,11 +40,11 @@ function verify_pathToInkscape {
|
|
40
40
|
|
41
41
|
# Define files required by the centos-art.sh script command line
|
42
42
|
# interface.
|
43
|
-
REPOFILES
|
43
|
+
REPOFILES[0]=${REPODIRS[1]}/CentOS.gpl
|
44
44
|
|
45
45
|
# Define symbolic links required by the centos-art.sh script
|
46
46
|
# command line interface.
|
47
|
-
REPOLINKS
|
47
|
+
REPOLINKS[0]=${REPODIRS[0]}/CentOS.gpl
|
48
48
|
|
49
49
|
# Check defined directories.
|
50
50
|
for FILE in "${REPODIRS[@]}";do
|