Fix other merge conflict, automatically find the JAVA_HOME

This commit is contained in:
idk
2021-03-19 19:14:24 -04:00
parent 8045d2e484
commit 0110bd956b
2 changed files with 10 additions and 7 deletions

View File

@ -1,11 +1,19 @@
#!/bin/bash
set -e
if [ -z "${JAVA_HOME}" ]; then
echo "JAVA_HOME needs to point to Java 14+"
JAVA=$(java --version | tr -d 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\n' | cut -d ' ' -f 2 | cut -d '.' -f 1 | tr -d '\n\t ')
if [ "$JAVA" -lt "14" ]; then
echo "Java 14+ must be used to compile with jpackage, java is $JAVA"
exit 1
fi
if [ -z "${JAVA_HOME}" ]; then
JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
echo "Building with: $JAVA, $JAVA_HOME"
fi
echo "cleaning"
./clean.sh

View File

@ -78,14 +78,9 @@ public class PackageLauncher {
targetDir.mkdirs();
else if (!targetDir.isDirectory())
throw new Exception(targetDir + " exists but not a directory. Please get it out of the way");
<<<<<<< HEAD
System.out.println(targetFile.toPath());
Files.copy(resource, targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
=======
if (!targetFile.exists() || overwrite)
Files.copy(resource, targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
>>>>>>> 52dbe4c90a0a27229bc391318dcd06254b6936e6
}
}