summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-05-05 13:08:03 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-05-05 13:08:03 -0400
commit81092fa4520971697d47e6a5d498d3cbd785adaa (patch)
tree727f54669ff00f71f2b5c4d3c4d556686c7f54a8
parentcdba3ca2afdf617fd856865d50a550cc6770e0d0 (diff)
Fix setting the description
-rwxr-xr-xgit-mirror3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-mirror b/git-mirror
index d09dfb6..76763c1 100755
--- a/git-mirror
+++ b/git-mirror
@@ -30,8 +30,7 @@ mirror-repo() {
repo=$1
canonical_path="$(config-get "repo.${repo}.canonical")"
local_path="$(config-get "repo.${repo}.local")"
- description="$(config-get "repo.${repo}.description")"
- [[ -n $description ]] || description="mirror of ${canonical_path}"
+ description="$(config-get "repo.${repo}.description" || printf 'mirror of %s' "${canonical_path}")"
gitget -f -n "$repo" bare "$canonical_path" "$local_path"
printf '%s\n' "$description" > "$local_path/description.tmp"