Fix other merge conflict, automatically find the JAVA_HOME
This commit is contained in:
12
build.sh
12
build.sh
@ -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
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user