aboutsummaryrefslogtreecommitdiff
path: root/cleardesc.sh
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-09-09 15:35:34 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-09-09 15:35:34 +0200
commitbf74d57b90d013c15201a79992ead44283deab5d (patch)
tree76364e016d810bc83533f0afc5143e4765fdffe8 /cleardesc.sh
parent84356869083bc196bffaef08305bb76756344155 (diff)
downloadreposync-bf74d57b90d013c15201a79992ead44283deab5d.tar.gz
+ cleardesc.sh: Clears repo description
Diffstat (limited to 'cleardesc.sh')
-rw-r--r--cleardesc.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/cleardesc.sh b/cleardesc.sh
new file mode 100644
index 0000000..9ac0997
--- /dev/null
+++ b/cleardesc.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+REALPATH=$(realpath $1)
+
+[ ! -d "$REALPATH" ] && exit 1
+
+for f in $REALPATH/*.git/description; do
+ CONTENT=$(cat $f)
+ [ "$CONTENT" = "Unnamed repository; edit this file 'description' to name the repository." ] && echo > $f
+done
+