Merge "[COMMON][ES] Simplify cert retrieval script"
[oom.git] / kubernetes / robot / scripts / etescript / vnfsdk-etescript.sh
index f1d3969..a93f109 100755 (executable)
@@ -1,7 +1,7 @@
-# SPDX-License-Identifier: Apache-2.0
-
 #!/bin/bash
 
+# SPDX-License-Identifier: Apache-2.0
+
 #
 # Create root certificate CA (Certificate Authority) and its private key.
 # Create the package certificate issued by CA
@@ -35,7 +35,7 @@ copy_package_certs_to_robot () {
 
 mkdir "$DIR/$SCRIPTDIR/tmp"
 cd "$DIR/$SCRIPTDIR/tmp"
-if [[ -f rootCA-robot-$SDCVALID.cert  &&  -f package-robot-$SDCVALID.cert  &&  -f package-robot-$SDCINVALID.cert  &&  -f package-private-robot-$SDCVALID.key  &&  -f package-private-robot-$SDCINVALID.key ]]; then
+if [ -f rootCA-robot-$SDCVALID.cert ] && [ -f package-robot-$SDCVALID.cert ] && [ -f package-robot-$SDCINVALID.cert ] && [ -f package-private-robot-$SDCVALID.key ] && [ -f package-private-robot-$SDCINVALID.key ]; then
         echo "All files are present";
 else
         generate_ca_key_cert_and_package_cert_issued_by_CA $SDCVALID