Documentation: clean up the makefile
[guilt.git] / guilt-init
blob7ebdc4d145de0f7d372870fe2ba95d046f775402
1 #!/bin/sh
3 # Copyright (c) Josef "Jeff" Sipek, 2006-2013
6 DO_NOT_CHECK_BRANCH_EXISTENCE=1
8 USAGE=""
9 if [ -z "$GUILT_VERSION" ]; then
10 echo "Invoking `basename "$0"` directly is no longer supported." >&2
11 exit 1
14 _main() {
16 while case $# in 0) break ;; esac; do
17 case $1 in
18 -a|-n)
19 echo "Autotagging is no longer supported" >&2
22 usage
24 esac
25 shift
26 done
28 if [ -d "$GUILT_DIR/$branch" ]; then
29 die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
32 [ ! -d "$GUILT_DIR" ] && mkdir "$GUILT_DIR"
33 mkdir -p "$GUILT_DIR/$branch"
34 touch "$GUILT_DIR/$branch/series"
35 touch "$GUILT_DIR/$branch/status"
37 mkdir -p "$GIT_DIR/hooks/guilt"
38 cat > "$GIT_DIR/hooks/guilt/delete" <<EOF
39 #!/bin/sh
40 # Usage: <script> <patch being removed>
42 echo "Removing patch '\$1'..."
43 EOF