mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 18:55:29 +03:00
17 lines
392 B
Bash
17 lines
392 B
Bash
#!/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
|