aboutsummaryrefslogtreecommitdiff
path: root/home/hide.sh
blob: 1a912d31f28a76acba0ef59d86d4d61a2c72328f (plain) (blame)
1
2
3
4
5
6
7
8
9
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"