]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email-lda: introduce --test-mode option
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 2 Dec 2013 08:00:31 +0000 (10:00 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 2 Dec 2013 08:00:31 +0000 (10:00 +0200)
We are going to teach this script sending replies, and this option will disable
the functionality, just like in the aiaia-email-test-patchset script. This
patch is just a preparation.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
email/aiaiai-email-lda

index 472b0cb3831aa52798ec538cdcfd3663b9d966d9..7c5a3626983bb96d2392ccfeb9b4c8ff8422b42c 100755 (executable)
@@ -44,6 +44,8 @@ Options:
                              minutes ago from the mail archive directory;
       --reap-incomplete=MIN  remove all incomplete patch series older than
                              current time minus MIN minutes;
+      --test-mode            test mode - work as usually, but do not send
+                             replies;
   -v, --verbose              be verbose;
   -h, --help                 show this text and exit.
 EOF
@@ -271,16 +273,20 @@ cleanup_handler()
 }
 set_cleanup_handler cleanup_handler
 
-TEMP=`getopt -n $PROG -o v,h --long reap-archive:,reap-incomplete:,verbose,help -- "$@"` ||
+TEMP=`getopt -n $PROG -o v,h --long test-mode,reap-archive:,reap-incomplete:,verbose,help -- "$@"` ||
        fail_usage ""
 eval set -- "$TEMP"
 
+test_mode=y
 archive_min=
 incomplete_min=
 verbose=
 
 while true; do
        case "$1" in
+       --test-mode)
+               test_mode=y
+               ;;
        --reap-archive)
                archive_min=$(opt_check_number "$1" "$2")
                shift