mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
683e9d86d1
Reviewed By: simpkins Differential Revision: D4394417 fbshipit-source-id: 38690a0a206ff0839c1605dfb8714f993bc3b67b
20 lines
605 B
Bash
Executable File
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
|