Skip to content

Commit

Permalink
Merge pull request #24 from judovana/moreCygwin
Browse files Browse the repository at this point in the history
Made javac cygwin friendly
  • Loading branch information
judovana committed Mar 1, 2024
2 parents e251a3d + 8a2c9f1 commit 088d1f2
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ function getjava() {
fi
}

function depath() {
echo "${1}" | depathStream
}

function depathStream() {
platform="$(uname)"
while IFS= read -r line ; do
if [ "${platform#"CYGWIN_NT"}" != "$platform" ]; then
cygpath -w "${line}"
else
echo "${line}"
fi
done
}

function checkXX() {
${LJAVA} -XX:+PrintFlagsFinal -version 2>/dev/null | grep -e ${1}
}
Expand Down Expand Up @@ -196,9 +211,9 @@ if [ ! -e ${CH_SCRIPT_DIR}/target ] ; then
popd
else
pushd $CH_SCRIPT_DIR/src/main/java/
${LJAVAC} -d $CH_SCRIPT_DIR/target/classes `find . -type f | grep ".java$"`
${LJAVAC} -d $(depath $CH_SCRIPT_DIR/target/classes) `find . -type f | grep ".java$" | depathStream`
pushd $CH_SCRIPT_DIR/target/classes
${LJAR} -cf $CH_SCRIPT_DIR/target/churn-1.0.jar *
${LJAR} -cf $(depath $CH_SCRIPT_DIR/target/churn-1.0.jar) *
popd
popd
fi
Expand Down

0 comments on commit 088d1f2

Please sign in to comment.