Fixed signing problems with directories containing whitespace
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 22 Feb 2020 18:15:11 +0000 (20:15 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 22 Feb 2020 18:15:11 +0000 (20:15 +0200)
gitlab #468

Change-Id: Iec62b603024dd362a9e69676bb5fdf0617d1b966

releng/org.simantics.sdk.build.p2.site/sign.sh

index 04dc132286ff144ffdaf90924b95b6f791405d57..79319ec4363378a7c2810b686554987815b6f6d0 100755 (executable)
@@ -19,7 +19,7 @@ signprops=$2
 tsa=$3
 
 function signprop {
-    grep "${1}" ${signprops}|cut -d'=' -f2
+    grep "${1}" "${signprops}"|cut -d'=' -f2
 }
 
 echo "----"
@@ -32,24 +32,24 @@ keyalias=$(signprop 'jarsigner.alias')
 storepass=$(signprop 'jarsigner.storepass')
 keypass=$(signprop 'jarsigner.keypass')
 
-for jar in `find ${dir}/target/repository/plugins/ -type f -not -ipath '*.source_*.jar'`; do
+for jar in `find "${dir}/target/repository/plugins/" -type f -not -ipath '*.source_*.jar'`; do
     echo "----"
     if [ -z ${tsa} ]; then
         echo "Signing $jar"
-        jarsigner -keystore ${keystore} \
+        jarsigner -keystore "${keystore}" \
                   -storepass ${storepass} \
                   -keypass ${keypass} \
                   -verbose \
-                  $jar \
+                  "$jar" \
                   ${keyalias}
     else
         echo "Signing and timestamping $jar"
-        jarsigner -keystore ${keystore} \
+        jarsigner -keystore "${keystore}" \
                   -storepass ${storepass} \
                   -keypass ${keypass} \
                   -verbose \
                   -tsa "${tsa}" \
-                  $jar \
+                  "$jar" \
                   ${keyalias}
     fi
 done