mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
cc2a9a760d
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
27 lines
522 B
Bash
Executable File
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 "$@"
|