aboutsummaryrefslogtreecommitdiff
path: root/home/hide.sh
diff options
context:
space:
mode:
Diffstat (limited to 'home/hide.sh')
-rwxr-xr-xhome/hide.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/home/hide.sh b/home/hide.sh
new file mode 100755
index 0000000..1a912d3
--- /dev/null
+++ b/home/hide.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if [ -z "$1" ] ; then
+ echo "Need to supply a path to the repository to hide"
+ exit 1
+fi
+if [ -e "$1/cgitrc" ]; then
+ sed -i '/^hide=/d' "$1/cgitrc"
+fi
+echo "hide=1" >> "$1/cgitrc"