Skip to content

Commit

Permalink
allow to build from another folder
Browse files Browse the repository at this point in the history
  • Loading branch information
e-marchand committed Jun 20, 2023
1 parent 1c85ab3 commit 4feab66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ else
fi

export KSCRIPT_DIRECTORY=$(pwd) # to force cache path inside current directory

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"

kscript --clear-cache
kscript --package main.kt 2>&1 | sed 's/\[nl\]/\n/g'

jar_path=$(find cache -name "main.jar")
jar_path=$(find "$KSCRIPT_DIRECTORY" -name "main.jar")

if [ -f "$jar_path" ]; then
mv "$jar_path" "$BINARY_PATH"
Expand Down

0 comments on commit 4feab66

Please sign in to comment.