blob: ec15ddc37ca09a1278282b148c47c9a0b37a246c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
set -eu
GITMF_SHARE_DIR='/usr/share/git-metafile'
verbose_opt='-v'
quiet_opt=''
case "${1:-}" in
-h | --help) echo "Usage: $0 [-h | --help] [-q] [ETC_DIR]"; exit 0;;
-q | --quiet) verbose_opt=''; quiet_opt='-q'; shift;;
esac
cd "${1:-/etc}"
git init $quiet_opt
ln -fs $verbose_opt "$GITMF_SHARE_DIR"/hooks/* .git/hooks/
cp $verbose_opt "$GITMF_SHARE_DIR"/gitignore .gitignore
|