sapling/eden/hooks/generate-hooks-dir
Michael Bolin 683e9d86d1 Update script because --into was changed to --out.
Reviewed By: simpkins

Differential Revision: D4394417

fbshipit-source-id: 38690a0a206ff0839c1605dfb8714f993bc3b67b
2017-01-09 16:02:04 -08:00

20 lines
605 B
Bash
Executable File

#!/bin/bash
# Generates a valid /etc/eden/hooks directory in the specified directory.
#
# This script takes one argument, which is the directory where the valid
# /etc/eden/hooks directory should be written. The specified directory may not
# exist, but its parent directory must exist.
HOOKS=`readlink -m "$1"`
if ! [[ -d `dirname $HOOKS` && ! -e "$HOOKS" ]]; then
echo "The parent of $HOOKS must exist but $HOOKS cannot exist."
exit 1
fi
mkdir $HOOKS
# Write the post-clone script into the desired directory.
TARGET=//eden/hooks/hg:post-clone
buck build @mode/opt $TARGET --out $HOOKS/post-clone