Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

Commit 1982f81

Browse files
committed
Revert "Read boot.properties in boot script"
This reverts commit 973c334.
1 parent c7cb6ee commit 1982f81

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

src/head.sh

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,6 @@
11
#!/usr/bin/env bash
2-
3-
set -euo pipefail
4-
5-
process_properties() {
6-
if [[ -f "$1" ]]; then
7-
while IFS='=' read -r key value; do
8-
if [[ -n "$value" ]]; then
9-
if [[ "$key" == "BOOT_JAVA_COMMAND" ]]; then
10-
java_command="$value"
11-
elif [[ "$key" == "BOOT_JVM_OPTIONS" ]]; then
12-
options=($value)
13-
fi
14-
fi
15-
done < "$1"
16-
fi
17-
}
18-
19-
# defaults
20-
21-
java_command=java
22-
declare -a options=(${BOOT_JVM_OPTIONS-})
23-
24-
# process properties files
25-
26-
process_properties "${BOOT_HOME:-$HOME/.boot}/boot.properties"
27-
process_properties "boot.properties"
28-
29-
# environment variables take precdence
30-
31-
if [[ -n "${BOOT_JAVA_COMMAND-}" ]]; then
32-
java_command="$BOOT_JAVA_COMMAND"
33-
fi
34-
if [[ -n "${BOOT_JVM_OPTIONS-}" ]]; then
35-
options=($BOOT_JVM_OPTIONS)
36-
fi
37-
2+
declare -a "options=($BOOT_JVM_OPTIONS)"
383
self="${BASH_SOURCE[0]}"
394
selfdir="$(cd "$(dirname "${self}")" ; pwd)"
405
selfpath="$selfdir/$(basename "$self")"
41-
exec "$java_command" "${options[@]}" -Dboot.app.path="$selfpath" -jar "$0" "$@"
6+
exec ${BOOT_JAVA_COMMAND:-java} "${options[@]}" -Dboot.app.path="$selfpath" -jar "$0" "$@"

0 commit comments

Comments
 (0)