forked from ziyang0116/rockplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdist.sh
More file actions
46 lines (36 loc) · 675 Bytes
/
Copy pathdist.sh
File metadata and controls
46 lines (36 loc) · 675 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
now=`date +%Y.%m.%d.%H:%M`
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
pause(){
echo
echo $1
read -t 3 -n 1 -p "press CTRL+C to quit" reply
echo
echo
}
exe(){
local pwd=`pwd`
echo $pwd\$ $1
`$1`
}
read -t 2 -n 1 -p "nvm use v14.18.2(y/n):" input
if [ "$input" == "y" ]; then
nvm use v14.18.2
fi
cd $DIR
dist="dev"
if [ "$1" == "prod" ]; then
dist="prod"
export CSC_IDENTITY_AUTO_DISCOVERY=false
fi
if [ "$dist" == "prod" ];then
npm run bytenode
fi
npm run compile
cp -rf dist/main/*.js app/
cp src/main/*.jsc app/
cp -rf src/renderer app/
cp -rf dist/renderer app/
npm run dist
#electron-builder --win --x64