diff --git a/meson-scripts/make-worker.sh b/meson-scripts/make-worker.sh new file mode 100755 index 000000000..adf6c1e44 --- /dev/null +++ b/meson-scripts/make-worker.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if ! [[ -d $MESON_SOURCE_ROOT/bin ]]; then + mkdir -p $MESON_SOURCE_ROOT/bin +fi + +if [[ -d $MESON_BUILD_ROOT ]]; then + if [[ -f $MESON_BUILD_ROOT/urbit ]]; then + cp $MESON_BUILD_ROOT/urbit $MESON_SOURCE_ROOT/bin/ + if ! [[ -f $MESON_SOURCE_ROOT/bin/urbit-worker ]]; then + ln -s $MESON_SOURCE_ROOT/bin/urbit $MESON_SOURCE_ROOT/bin/urbit-worker + fi + fi +fi diff --git a/meson.build b/meson.build index fc135b1b6..707121676 100644 --- a/meson.build +++ b/meson.build @@ -329,3 +329,5 @@ dependencies: [openssl_dep, murmur3_dep, softfloat3_dep] + os_deps, install: true) + +run_target('worker', command: 'meson-scripts/make-worker.sh') diff --git a/scripts/build b/scripts/build index bf5353f54..e89fe8e8f 100755 --- a/scripts/build +++ b/scripts/build @@ -2,4 +2,4 @@ mkdir ./build &> /dev/null meson . ./build --buildtype=release -ninja -C build +ninja -C build && ninja -C build worker