]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Allow enabling only timestamps without verbose command output
authorTobias Brunner <tobias@strongswan.org>
Mon, 1 Oct 2018 17:25:52 +0000 (19:25 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Nov 2018 13:32:25 +0000 (14:32 +0100)
-t enables only the timestamps, -v additionally logs command output
(includes -t).

testing/do-tests

index 77d5eccdf1bb77a9da470bb0db45afdd9f77e20a..fad3af8cd57d49c1de9d8a44613bd76a657014b7 100755 (executable)
@@ -51,11 +51,15 @@ subdir_cnt="0"
 ##############################################################################
 # parse optional arguments
 #
-while getopts "v" opt
+while getopts "vt" opt
 do
        case "$opt" in
        v)
                verbose=YES
+               timestamps=YES
+               ;;
+       t)
+               timestamps=YES
                ;;
        esac
 done
@@ -64,7 +68,7 @@ shift $((OPTIND-1))
 
 function print_time()
 {
-       [ "$verbose" == "YES" ] && echo "$(date +%T.%N) ~ "
+       [ "$timestamps" == "YES" ] && echo "$(date +%T.%N) ~ "
 }
 
 ##############################################################################