Make oss install script less hacky using --out argument to buck build.

Summary:
The `--out` option was not available when this script was originally written,
but this is exactly the sort of hacky shell-scripting it is desgined to
replace.

Reviewed By: mzlee

Differential Revision: D4625460

fbshipit-source-id: 9c884d0274bb5ebda8c59a7c9c6b2be22efd6265
This commit is contained in:
Michael Bolin 2017-02-28 12:09:56 -08:00 committed by Facebook Github Bot
parent c764deb101
commit 22994cb1e8

14
install
View File

@ -4,15 +4,13 @@ set -e
cd `git rev-parse --show-toplevel`
buck build eden-cli eden-daemon
OUTPUT_DIR=buck-out/eden
mkdir -p $OUTPUT_DIR
EDEN_CLI="$OUTPUT_DIR/eden"
EDEN_DAEMON="$OUTPUT_DIR/daemon"
EDEN_CLI=`buck targets --show-output eden-cli | awk '{print $2}'`
EDEN_DAEMON=`buck targets --show-output eden-daemon | awk '{print $2}'`
buck build --out $EDEN_CLI eden-cli
buck build --out $EDEN_DAEMON eden-daemon
sudo chmod 4755 $EDEN_DAEMON
cp "$EDEN_CLI" "$OUTPUT_DIR/eden"
cp "$EDEN_DAEMON" "$OUTPUT_DIR/daemon"
sudo chmod 4755 "$OUTPUT_DIR/daemon"
echo "Eden executable available in $OUTPUT_DIR/eden."
echo "Eden executable available in: $EDEN_CLI"