sapling/contrib/with-hg-dev
Saurabh Singh cc2a9a760d hg: remove facebook-hg-rpms related code
Summary:
Don't think this is required or used anymore and reveals information
about the structure of our project if we open source our mercurial.

Reviewed By: quark-zju

Differential Revision: D7128203

fbshipit-source-id: 4cdfa008631d08321a4d5a1c8f18cef429c35077
2018-04-13 21:51:20 -07:00

27 lines
522 B
Bash
Executable File

#!/bin/bash
#
# Run scripts with hg-dev environment. Examples:
#
# with-hg-dev ./lint.py
# with-hg-dev ./unit.py
#
# Exit 40 if hg-dev cannot be found, or does not have desired effect.
SCRIPT_PATH="${BASH_SOURCE[0]:-$0}"
builtin cd $(dirname "$SCRIPT_PATH")
if [[ -z $HG_DEV_DIR ]]; then
for path in ../../hg-dev ${HG_RPM_DIR}; do
if [[ -f "$path" ]]; then
source "$path"
break
fi
done
if [[ -z $HG_DEV_DIR ]]; then
echo abort: cannot find hg-dev 1>&2
exit 40
fi
fi
command "$@"