Skip to content

Commit

Permalink
Fix tools.sh release function not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Yu committed Apr 26, 2022
1 parent 870aa6c commit a69948d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ function release_win() {
[[ $OS != Windows_NT ]] && echo 'release function is only for Windows.' && exit 4
[[ -z "$1" ]] && echo "Usage: ./run.sh release {directoryName}" && exit 4
mkdir -p "$1/bin"
mkdir -p "$1/src"
cat checkenv.cmd > "$1/run.cmd"
echo: >> "$1/run.cmd"
echo 'set PATH=bin;%PATH%' >> "$1/run.cmd"
echo 'python3 .\gui\main.py' >> "$1/run.cmd"
cat env.cmd > "$1/run.cmd"
echo : >> "$1/run.cmd"
echo 'python3 .\gui\main.py' >> "$1/run.cmd"
cp "$(dirname "$(which dot)")"/* "$1/bin/"
cp "$(which flex)" "$1/bin/"
cp build/lrparser.exe "$1/bin/"
rm -rf src/gui/__pycache__ && cp -r src/gui "$1/src/gui"
cp -r gui "$1/gui"
}

case $1 in
Expand All @@ -62,4 +60,4 @@ case $1 in
echo '3) convert # Convert yacc file to lrparser file'
echo '4) release # Generate release directory'
;;
esac
esac

0 comments on commit a69948d

Please sign in to comment.