summaryrefslogtreecommitdiff
path: root/ignore
blob: 4e7984c679b8a9ea0f85b968fc251e8af5ec92c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash

if [ $# -ne 1 ]; then
    echo "usage: ignore <name>"
    exit 1
fi

set -xe

USER="compromyse"

base_dir="$HOME"
repo="${base_dir}/$1"

case $repo in
    *\.git)
	;;
    *)
	repo="${repo}.git"
	;;
esac

if [ ! -d "$repo" ]; then
    echo "$repo does not exist"
    exit 1
fi

cd $repo
git config cgit.ignore 1