gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Better help message and user question in unify-sources.sh
0 1 0
default
1 file changed with 14 insertions and 15 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -65,7 +65,7 @@
65 65

	
66 66
function update_done() {
67 67
    echo $CHANGED_FILES out of $TOTAL_FILES files has been changed.
68
    echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
68
    echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
69 69
}
70 70

	
71 71
function update_begin() {
... ...
@@ -107,7 +107,7 @@
107 107

	
108 108
function check_done() {
109 109
    echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
110
    echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
110
    echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
111 111

	
112 112
    if [ $FAILED_FILES -gt 0 ]
113 113
    then
... ...
@@ -116,7 +116,7 @@
116 116
    then
117 117
	if [ "$WARNING" == 'INTERACTIVE' ]
118 118
	then
119
	    echo -n "Assume as normal behaviour? (yes/no) "
119
	    echo -n "Are the files with warnings acceptable? (yes/no) "
120 120
	    while read answer
121 121
	    do
122 122
		if [ "$answer" == 'yes' ]
... ...
@@ -126,7 +126,7 @@
126 126
		then
127 127
		    return 1
128 128
		fi
129
		echo -n "Assume as normal behaviour? (yes/no) "		    
129
		echo -n "Are the files with warnings acceptable? (yes/no) "
130 130
	    done
131 131
	elif [ "$WARNING" == 'WERROR' ]
132 132
	then
... ...
@@ -257,24 +257,23 @@
257 257
  $0 [OPTIONS] [files]
258 258
Options:
259 259
  --dry-run|-n
260
     Check the given files, but do not modify them.
260
     Check the files, but do not modify them.
261 261
  --interactive|-i
262
     If --dry-run is specified and files are warned then a message is
263
     prompted whether the warnings should be turned to errors.
262
     If --dry-run is specified and the checker emits warnings,
263
     then the user is asked if the warnings should be considered
264
     errors.
264 265
  --werror|-w
265
     If --dry-run is specified and the warnings are turned to errors.
266
     Make all warnings into errors.
266 267
  --all|-a
267 268
     All files in the repository will be checked.
268 269
  --modified|-m
269
     Check only the modified source files. This option is proper to
270
     use before a commit. E.g. all files which are modified or added
271
     into the repository will be updated.
270
     Check only the modified (and new) source files. This option is
271
     useful to check the modification before making a commit.
272 272
  --changed|-c
273 273
     Check only the changed source files compared to the parent(s) of
274
     the current hg node.  This option is proper to use as hg hook
275
     script. E.g. to check all your commited source files with this
276
     script add the following section to the appropriate .hg/hgrc
277
     file.
274
     the current hg node.  This option is useful as hg hook script.
275
     To automatically check all your changes before making a commit,
276
     add the following section to the appropriate .hg/hgrc file.
278 277

	
279 278
       [hooks]
280 279
       pretxncommit.checksources = scripts/unify-sources.sh -c -n -i
0 comments (0 inline)