Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinicius Reis <vinicius.reis@nextcloud.com>2022-06-06 17:27:54 +0300
committerVinicius Reis <vinicius.reis@nextcloud.com>2022-06-06 17:27:54 +0300
commitbb49e3c248eb1f0cb5f3e13a315c3eee0369e9a1 (patch)
tree64b64a5b9c7a30d652ee5d5adaaa81ac360d1f4f /cypress
parent324ebe92f8c52d1ac2fe584f1f2fdacae0fcc42d (diff)
🩹 (#2481): fix small bash lints
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Diffstat (limited to 'cypress')
-rwxr-xr-xcypress/runLocal.sh28
1 files changed, 15 insertions, 13 deletions
diff --git a/cypress/runLocal.sh b/cypress/runLocal.sh
index 86dc89b8e..843079ea7 100755
--- a/cypress/runLocal.sh
+++ b/cypress/runLocal.sh
@@ -1,38 +1,40 @@
#!/bin/bash
-export CYPRESS_DIR=$(dirname -- "$(readlink -f "${BASH_SOURCE}")")
-export CYPRESS_baseUrl=${CYPRESS_baseUrl:-http://localhost:8081/index.php}
-export APP_SOURCE=$CYPRESS_DIR/..
+CYPRESS_DIR=$(dirname -- "$(readlink -f "${BASH_SOURCE}")")
+CYPRESS_baseUrl=${CYPRESS_baseUrl:-http://localhost:8081/index.php}
+APP_SOURCE=$CYPRESS_DIR/..
+
+export CYPRESS_DIR
+export CYPRESS_baseUrl
+export APP_SOURCE
function finish {
docker-compose down
}
trap finish EXIT
-cd $CYPRESS_DIR
-if [ ! -f $(npm bin)/wait-on ]
+cd "$CYPRESS_DIR" || exit
+if [ ! -f "$(npm bin)/wait-on" ]
then
npm install --no-save wait-on
fi
# start server if it's not running yet
-if $(npm bin)/wait-on -i 500 -t 1000 $CYPRESS_baseUrl 2> /dev/null
+if "$(npm bin)/wait-on" -i 500 -t 1000 "$CYPRESS_baseUrl" 2> /dev/null
then
- echo Server is up at $CYPRESS_baseUrl
+ echo Server is up at "$CYPRESS_baseUrl"
else
- echo No server reached at $CYPRESS_baseUrl - starting containers.
+ echo No server reached at "$CYPRESS_baseUrl" - starting containers.
docker-compose up -d
- if $(npm bin)/wait-on -i 500 -t 240000 $CYPRESS_baseUrl 2> /dev/null
+ if "$(npm bin)/wait-on" -i 500 -t 240000 "$CYPRESS_baseUrl" 2> /dev/null
then
docker-compose exec -T nextcloud_cypress bash /var/www/html/custom_apps/text/cypress/server.sh
else
- echo Waiting for $CYPRESS_baseUrl timed out.
+ echo Waiting for "$CYPRESS_baseUrl" timed out.
echo Container logs:
docker-compose logs
exit 1
fi
fi
-(cd .. && $(npm bin)/cypress $@)
-
-
+(cd .. && "$(npm bin)/cypress" "$@")