2017-11-04 13:46:06 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2017-11-04 14:32:26 +02:00
|
|
|
BUILD_DIR="$ROOT_DIR/app"
|
2017-11-04 13:46:06 +02:00
|
|
|
|
2017-12-14 20:12:14 +02:00
|
|
|
rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
2017-11-04 13:46:06 +02:00
|
|
|
|
2017-11-15 01:05:35 +02:00
|
|
|
cd "$BUILD_DIR"
|
|
|
|
npm run compile
|
|
|
|
|
|
|
|
# for JSX_FILE in "$BUILD_DIR"/gui/*.jsx; do
|
|
|
|
# JS_FILE="${JSX_FILE::-4}.min.js"
|
|
|
|
# if [ $JSX_FILE -nt $JS_FILE ]; then
|
|
|
|
# echo "Compile $JS_FILE..."
|
|
|
|
# "$ROOT_DIR/app/node_modules/.bin/babel" --presets react "$JSX_FILE" > "$JS_FILE"
|
|
|
|
# if [[ $? != 0 ]]; then
|
|
|
|
# exit 1
|
|
|
|
# fi
|
|
|
|
# fi
|
|
|
|
# done
|
2017-11-04 17:42:20 +02:00
|
|
|
|
2017-11-05 17:35:38 +02:00
|
|
|
# TRANSLATION_BUILD_SCRIPT="$ROOT_DIR/../CliClient/build/build-translation.js"
|
|
|
|
# if [[ ! -f $TRANSLATION_BUILD_SCRIPT ]]; then
|
|
|
|
# echo "Build the CLI app first ($TRANSLATION_BUILD_SCRIPT missing)"
|
|
|
|
# exit 1
|
|
|
|
# fi
|
2017-11-04 13:46:06 +02:00
|
|
|
|
2017-11-05 17:35:38 +02:00
|
|
|
# node "$TRANSLATION_BUILD_SCRIPT" --silent
|