Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made javac cygwin friendly #24

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading