anki/run
Damien Elmes aa816177d0 add --force-delete to ./run
Excluded files in folders were preventing stale folders from being
removed when deps were updated, leading to warnings on run.
2020-12-28 17:23:52 +10:00

25 lines
644 B
Bash
Executable File

#!/bin/bash
set -e
run_linux() {
bazel run $BUILDARGS //qt:runanki -- $*
}
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)
bazel build $BUILDARGS //qt:runanki && \
rsync -aiL --exclude=anki/external --exclude=__pycache__ --delete --force-delete \
$workspace/bazel-bin/qt/runanki* $workspace/bazel-copy/ && \
$workspace/bazel-copy/runanki $*
}
export PYTHONWARNINGS=default
if [[ "$OSTYPE" == "darwin"* ]]; then
run_mac $*
else
run_linux $*
fi