Skip to content

Commit abe283b

Browse files
committed
Double quotes to prevent globbing and word splitting
1 parent 43ac603 commit abe283b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

installers/build-installers.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function prepare_nbpackage {
4646
function build_nbpackage {
4747
echo ">> Building the nbpackage installer for $1-$2"
4848

49-
./nbpackage/nbpackage-$nbpackage_version/bin/nbpackage --input ../dist/jmonkeyplatform.zip --config $1-$2/$3 --output ../dist/ -v -Ppackage.version=$4
49+
./nbpackage/nbpackage-$nbpackage_version/bin/nbpackage --input ../dist/jmonkeyplatform.zip --config "$1-$2/$3" --output ../dist/ -v -Ppackage.version="$4"
5050

5151
echo "<< OK!"
5252
}
@@ -55,8 +55,8 @@ function build_nbpackage {
5555
function build_linux_deb {
5656
echo "> Building the Linux DEB"
5757

58-
build_nbpackage linux x64 jmonkeyengine-x64-deb.properties $1
59-
build_nbpackage linux aarch64 jmonkeyengine-aarch64-deb.properties $1
58+
build_nbpackage linux x64 jmonkeyengine-x64-deb.properties "$1"
59+
build_nbpackage linux aarch64 jmonkeyengine-aarch64-deb.properties "$1"
6060

6161
echo "< OK!"
6262
}
@@ -66,7 +66,7 @@ function build_windows_installer {
6666

6767
setup_inno_setup $2
6868

69-
build_nbpackage windows x64 jmonkeyengine-windows-x64.properties $1
69+
build_nbpackage windows x64 jmonkeyengine-windows-x64.properties "$1"
7070

7171
echo "< OK!"
7272
}
@@ -106,8 +106,8 @@ function download_inno_setup {
106106
function build_macos_pgk {
107107
echo "> Building the MacOS pgk"
108108

109-
build_nbpackage macos x64 jmonkeyengine-macos-x64.properties $1
110-
build_nbpackage macos aarch64 jmonkeyengine-macos-aarch64.properties $1
109+
build_nbpackage macos x64 jmonkeyengine-macos-x64.properties "$1"
110+
build_nbpackage macos aarch64 jmonkeyengine-macos-aarch64.properties "$1"
111111

112112
echo "< OK!"
113113
}
@@ -123,7 +123,7 @@ fi
123123

124124
download_nbpackage
125125
prepare_nbpackage
126-
build_linux_deb $versionString
127-
build_windows_installer $versionString $2
126+
build_linux_deb "$versionString"
127+
build_windows_installer "$versionString" "$2"
128128
# MACOS needs signed packages etc. So disabled
129-
#build_macos_pgk $versionString
129+
#build_macos_pgk "$versionString"

installers/download-jdks.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jdk_vendor="eclipse"
1111
function download_jdk {
1212
echo ">>> Downloading the JDK for $1_$2$3"
1313

14-
if [ -f $2-$1/jdk-$1_$2$3 ];
14+
if [ -f "$2-$1/jdk-$1_$2$3" ];
1515
then
1616
echo "<<< Already existing, SKIPPING."
1717
else
18-
curl -# -o $2-$1/jdk-$1_$2$3 -L https://api.adoptium.net/v3/binary/latest/$jdk_major_version/ga/$2/$1/jdk/$jvm_impl/normal/$jdk_vendor?project=jdk
18+
curl -# -o "$2-$1/jdk-$1_$2$3" -L "https://api.adoptium.net/v3/binary/latest/$jdk_major_version/ga/$2/$1/jdk/$jvm_impl/normal/$jdk_vendor?project=jdk"
1919
echo "<<< OK!"
2020
fi
2121
}
@@ -55,12 +55,12 @@ function get_jdk {
5555
fi
5656

5757
# Depends on UNPACK and thus DOWNLOAD
58-
if [ $1 == "windows" ]; then
59-
get_jdk_windows $2
60-
elif [ $1 == "linux" ]; then
61-
get_jdk_linux $2
62-
elif [ $1 == "macos" ]; then
63-
get_jdk_macos $2
58+
if [ "$1" == "windows" ]; then
59+
get_jdk_windows "$2"
60+
elif [ "$1" == "linux" ]; then
61+
get_jdk_linux "$2"
62+
elif [ "$1" == "macos" ]; then
63+
get_jdk_macos "$2"
6464
fi
6565

6666
echo "< OK!"

0 commit comments

Comments
 (0)