d01236 Update html_getActions.sh.

Authored and Committed by areguera 13 years ago
Scripts/Bash/Functions/Html/html_getActions.sh CHANGED
@@ -27,10 +27,10 @@
27
27
function html_getActions {
28
28
29
29
# Define short options we want to support.
30
- local ARGSS="f:"
30
+ local ARGSS=""
31
31
32
32
# Define long options we want to support.
33
- local ARGSL="filter:,update-headings:"
33
+ local ARGSL="update-headings:"
34
34
35
35
# Parse arguments using getopt(1) command parser.
36
36
cli_doParseArguments
@@ -48,30 +48,11 @@ function html_getActions {
48
48
# Define action value passed through the command-line.
49
49
ACTIONVAL="$2"
50
50
51
- # Check action value passed through the command-line.
52
- cli_checkRepoDirSource
53
-
54
51
# Define action name using action value as reference.
55
52
ACTIONNAM="${FUNCNAM}_updateHeadings"
56
53
57
- # Look for sub-options passed through command-line.
58
- while true; do
54
+ # Rotate positional parameters.
55
+ shift 2
59
- case "$3" in
60
- -f|--filter )
61
- # Redefine regular expression.
62
- FLAG_FILTER="$4"
63
- # Rotate positional parameters
64
- shift 4
65
- ;;
66
- * )
67
- # Break sub-options loop.
68
- break
69
- ;;
70
- esac
71
- done
72
-
73
- # Break options loop.
74
- break
75
56
;;
76
57
77
58
* )
@@ -79,13 +60,14 @@ function html_getActions {
79
60
esac
80
61
done
81
62
82
- # Verify action value variable.
83
- if [[ $ACTIONVAL == '' ]];then
84
- cli_printMessage "$(caller)" 'AsToKnowMoreLine'
85
- fi
63
+ # Check action value. Be sure the action value matches the
64
+ # convenctions defined for source locations inside the working
65
+ # copy.
66
+ cli_checkRepoDirSource
86
67
87
- # Redefine regular expression to match html files only.
88
- FLAG_FILTER=$(echo "${FLAG_FILTER}.*\.(html|htm)")
68
+ # Syncronize changes between the working copy and the central
69
+ # repository to bring down changes.
70
+ cli_commitRepoChanges "${WORKDIR}"
89
71
90
72
# Execute action name.
91
73
if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then
@@ -95,4 +77,8 @@ function html_getActions {
95
77
cli_printMessage "$(caller)" 'AsToKnowMoreLine'
96
78
fi
97
79
80
+ # Syncronize changes between the working copy and the central
81
+ # repository to commit up changes.
82
+ cli_commitRepoChanges "${WORKDIR}"
83
+
98
84
}