bitburner-src/tools/package-electron.sh
Martin Fournier cec5f1ce29 Move electron build script to /tools/
Also enables bash strict mode flags for the build script
2022-04-07 07:48:44 -04:00

23 lines
390 B
Bash

#!/bin/sh
set -euxo pipefail
# Clear out any files remaining from old builds
rm -rf .package
mkdir -p .package/dist/ || true
cp index.html .package
cp favicon.ico .package
cp -r electron/* .package
cp -r dist .package
# Install electron sub-dependencies
cd electron
npm install
cd ..
BUILD_PLATFORM="${1:-"all"}"
# And finally build the app.
npm run electron:packager-$BUILD_PLATFORM