summaryrefslogtreecommitdiff
path: root/ignore
blob: 54b988ee82a3f0d51f5fe5f1bcc4e0d0ab7f2c96 (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
#!/usr/bin/env bash

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

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