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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#!/bin/sh
#
# Copyright (c) Josef "Jeff" Sipek, 2006-2011
#
DO_NOT_CHECK_BRANCH_EXISTENCE=1
USAGE=""
if [ -z "$GUILT_VERSION" ]; then
echo "Invoking `basename $0` directly is no longer supported." >&2
exit 1
fi
_main() {
while case $# in 0) break ;; esac; do
case $1 in
-a|-n)
echo "Autotagging is no longer supported" >&2
;;
*)
usage
;;
esac
shift
done
if [ -d "$GUILT_DIR/$branch" ]; then
die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
fi
[ ! -d "$GUILT_DIR" ] && mkdir "$GUILT_DIR"
mkdir -p "$GUILT_DIR/$branch"
touch "$GUILT_DIR/$branch/series"
touch "$GUILT_DIR/$branch/status"
mkdir -p "$GIT_DIR/hooks/guilt"
cat > "$GIT_DIR/hooks/guilt/delete" <<EOF
#!/bin/sh
# Usage: <script> <patch being removed>
echo "Removing patch '\$1'..."
EOF
}
|