-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.sh
34 lines (28 loc) · 670 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
if ! command -v pkg &> /dev/null
then
echo "Installing pkg"
npm i -g pkg
fi
rm -Rf build
mkdir build
cd build
git clone [email protected]:kjdElectronics/fd-tone-notify.git code
cd code
npm install --production
UNAME=$(uname -m)
if [[ $UNAME == *"arm"* ]]; then
pkg package.json --targets node12.18.1 --out-path build
cd build
else
pkg package.json --targets node12-win-x64,node12-linux-x64 --out-path build
cd build
mv fd-tone-notify-win.exe fd-tone-notify.exe
mv fd-tone-notify-linux fd-tone-notify
fi
#cd back to root build folder
cd ../../
# Move the built executables back to root build
mv code/build/* .
# Remove code
rm -Rf code