]> git.armaanb.net Git - bin.git/commitdiff
git-mirror: optionally get sleep duration from command line
authorArmaan Bhojwani <me@armaanb.net>
Fri, 9 Apr 2021 18:40:02 +0000 (14:40 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Fri, 9 Apr 2021 18:40:02 +0000 (14:40 -0400)
git-mirror

index d9864184162c3bdfc624ffa8ea009162c736aa37..6d3f00cad6a7e6810d7b72deefd9834796909630 100755 (executable)
@@ -4,6 +4,7 @@
 usage() {
   echo 'Usage: git-mirror [command] [arguments]
   git-mirror run [path to repos] [path to log file] [html directory]
+      optional: [sleep duration]
   git-mirror gen-url [path to repo] -- generate url file in repo
   git-mirror help -- show this message
 
@@ -40,7 +41,7 @@ run() {
           echo $(date -Iseconds) ' | ' ${dir} | tee -a ${2}
           echo $(tail -n 1500 ${2}) > ${2}
         done
-        sleep 600
+        sleep ${4:-600}
       done
     }