#!/bin/sh
+set -e
+
DIST_DIR="./dist"
compile_all() {
cp ./scripts/onyx-pkg.onyx "$DIST_DIR/tools"
cp ./scripts/default.json "$DIST_DIR/tools/pkg_templates"
- echo "Installing runtime library"
- mkdir -p "$DIST_DIR/lib"
- mkdir -p "$DIST_DIR/include"
-
- case "$(uname)" in
- Linux) suffix='so' ;;
- *BSD) suffix='so' ;;
- Darwin) suffix='dylib' ;;
- *) suffix='dll' ;;
- esac
-
- [ -f runtime/onyx_runtime.$suffix ] && cp runtime/onyx_runtime.$suffix "$DIST_DIR/lib/"
- cp "shared/include/onyx_library.h" "$DIST_DIR/include/onyx_library.h"
- cp "shared/include/wasm.h" "$DIST_DIR/include/wasm.h"
+ if [ ! -z ${ONYX_RUNTIME_LIBRARY+x} ]; then
+ echo "Installing runtime library"
+ mkdir -p "$DIST_DIR/lib"
+ mkdir -p "$DIST_DIR/include"
+
+ case "$(uname)" in
+ Linux) suffix='so' ;;
+ *BSD) suffix='so' ;;
+ Darwin) suffix='dylib' ;;
+ *) suffix='dll' ;;
+ esac
+
+ [ -f runtime/onyx_runtime.$suffix ] && cp runtime/onyx_runtime.$suffix "$DIST_DIR/lib/"
+ cp "shared/include/onyx_library.h" "$DIST_DIR/include/onyx_library.h"
+ cp "shared/include/wasm.h" "$DIST_DIR/include/wasm.h"
+ fi
cp -r "tests" "$DIST_DIR/"
cp -r "examples" "$DIST_DIR/"
cp misc/onyx-windows.sublime-build "$DIST_DIR/misc"
cp misc/onyx-mode.el "$DIST_DIR/misc"
cp misc/onyx.sublime-syntax "$DIST_DIR/misc"
+ cp misc/onyx.tmPreferences "$DIST_DIR/misc"
cp misc/vscode/onyxlang-0.1.9.vsix "$DIST_DIR/misc"
cp LICENSE "$DIST_DIR/LICENSE"