2020-01-02 10:43:19 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-03 23:44:47 +01:00
|
|
|
set -e
|
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
run_linux() {
|
2020-12-07 02:50:03 +01:00
|
|
|
bazel run $BUILDARGS //qt:runanki -- $*
|
2020-11-01 05:26:58 +01:00
|
|
|
}
|
2020-03-22 19:52:56 +01:00
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
run_mac() {
|
|
|
|
# QtWebEngineProcess is unable to locate icudtl.dat from a symlinked tree,
|
|
|
|
# so we need to copy the files into a working folder before running on a Mac.
|
|
|
|
workspace=$(dirname $0)
|
2020-12-07 02:50:03 +01:00
|
|
|
bazel build $BUILDARGS //qt:runanki && \
|
2021-01-10 07:17:55 +01:00
|
|
|
rsync -aiL --exclude=anki/external --delete -f'-p __pycache__' \
|
2020-11-01 05:26:58 +01:00
|
|
|
$workspace/bazel-bin/qt/runanki* $workspace/bazel-copy/ && \
|
|
|
|
$workspace/bazel-copy/runanki $*
|
|
|
|
}
|
|
|
|
|
2020-12-16 05:29:31 +01:00
|
|
|
export PYTHONWARNINGS=default
|
2020-11-01 05:26:58 +01:00
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
2020-11-03 23:44:47 +01:00
|
|
|
run_mac $*
|
2020-11-01 05:26:58 +01:00
|
|
|
else
|
2020-11-03 23:44:47 +01:00
|
|
|
run_linux $*
|
2020-11-01 05:26:58 +01:00
|
|
|
fi
|