From 40a429d2f3aea6931c826f887f351414f80d640e Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Sat, 22 Oct 2016 17:47:57 +0200
Subject: Cleanup mkrepo, mrrepo some more

---
 server/mkrepo |  2 +-
 server/mrrepo | 28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/server/mkrepo b/server/mkrepo
index 82eaa4a..c6c6333 100755
--- a/server/mkrepo
+++ b/server/mkrepo
@@ -21,7 +21,7 @@ function error () { info "$*"; exit 1; }
 
 public="y"
 
-while [ "$#" -gt "0" ]; do
+while [ "$#" -gt 0 ]; do
   case "$1" in
     --private)
       public="n"
diff --git a/server/mrrepo b/server/mrrepo
index 91f6966..85a037c 100755
--- a/server/mrrepo
+++ b/server/mrrepo
@@ -31,12 +31,12 @@ function error () { info "$*"; exit 1; }
 prot="http"
 host=
 path=
-verb="0"
+verb=0
 
-while [ "$#" -gt "0" ]; do
+while [ "$#" -gt 0 ]; do
   case "$1" in
     -v)
-      verb="1"
+      verb=1
       shift
       ;;
     -s)
@@ -67,20 +67,20 @@ fi
 cd "$path"
 
 curl_ops=()
-curl_ops+=("-f")              # Fail on HTTP errors.
-curl_ops+=("--max-time" "30") # Finish in 30 seconds.
+curl_ops+=(-f)            # Fail on HTTP errors.
+curl_ops+=(--max-time 30) # Finish in 30 seconds.
 
-if [ "$verb" -ge "1" ]; then
-  curl_ops+=("--progress-bar")
+if [ "$verb" -ge 1 ]; then
+  curl_ops+=(--progress-bar)
 else
-  curl_ops+=("-s" "-S")       # Silent but show errors.
+  curl_ops+=(-s -S)       # Silent but show errors.
 fi
 
 function fetch () # <url> [<curl-options>]
 {
   local u="$1"; shift
 
-  if [ "$verb" -ge "1" ]; then
+  if [ "$verb" -ge 1 ]; then
     info "${curl_ops[@]}" "$@" "$u"
   fi
 
@@ -99,8 +99,8 @@ done <manifest
 old=("$(find . -type d -name '*.git' -print -prune | sed -e 's%^./%%' -)")
 
 git_ops=()
-if [ "$verb" -eq "0" ]; then
-  git_ops+=("-q")
+if [ "$verb" -eq 0 ]; then
+  git_ops+=(-q)
 fi
 
 for r in "${new[@]}"; do
@@ -110,7 +110,7 @@ for r in "${new[@]}"; do
     fi
   fi
   if [ ! -d "$r" ]; then
-    if [ "$verb" -ge "1" ]; then
+    if [ "$verb" -ge 1 ]; then
       info "new repository $r in manifest, cloning"
       info git clone "${git_ops[@]}" --mirror "git://$host/$r" "$r"
     fi
@@ -121,7 +121,7 @@ for r in "${new[@]}"; do
     #
     fetch "$prot://$host/$r/description" -o "$r/description"
   else
-    if [ "$verb" -ge "1" ]; then
+    if [ "$verb" -ge 1 ]; then
       info "existing repository $r, fetching"
       info git -C "$r" fetch "${git_ops[@]}" --prune --tags
     fi
@@ -140,7 +140,7 @@ for o in "${old[@]}"; do
   done
 
   if [ -n "$o" ]; then
-    if [ "$verb" -ge "1" ]; then
+    if [ "$verb" -ge 1 ]; then
       info "repository $o is no longer in manifest, removing"
     fi
     rm -rf "$o"
-- 
cgit v1.1