diff options
| author | Sebastiaan van Stijn <github@gone.nl> | 2018-12-22 20:18:33 +0100 |
|---|---|---|
| committer | Sebastiaan van Stijn <github@gone.nl> | 2018-12-24 00:05:14 +0100 |
| commit | 297b30df5ff4deaaedb6ceb17d7bd2e306a580ab (patch) | |
| tree | 708e71c9398d8359bb2fe08ccdfb445c0fc55473 /hack/make/.integration-daemon-stop | |
| parent | d147fe0582f44c0fc22ec8bdffff44939dd54d52 (diff) | |
| download | docker-297b30df5ff4deaaedb6ceb17d7bd2e306a580ab.tar.gz | |
Bash scripts; use double brackets, fix bare variables, add quotes
These scripts explicitly use Bash, so we should be able to use
`[[` instead of `[` (which seems to be recommended).
Also added curly brackets to some bare variables, and quoted some paths.
This makes my IDE a bit more silent :-)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'hack/make/.integration-daemon-stop')
| -rw-r--r-- | hack/make/.integration-daemon-stop | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hack/make/.integration-daemon-stop b/hack/make/.integration-daemon-stop index c1d43e1a5e..e0d58b7d22 100644 --- a/hack/make/.integration-daemon-stop +++ b/hack/make/.integration-daemon-stop @@ -1,10 +1,10 @@ #!/usr/bin/env bash -if [ ! "$(go env GOOS)" = 'windows' ]; then +if [[ ! "$(go env GOOS)" = 'windows' ]]; then for pidFile in $(find "$DEST" -name docker.pid); do - pid=$([ -n "$TESTDEBUG" ] && set -x; cat "$pidFile") + pid=$([[ -n "$TESTDEBUG" ]] && set -x; cat "$pidFile") ( - [ -n "$TESTDEBUG" ] && set -x + [[ -n "$TESTDEBUG" ]] && set -x kill "$pid" ) if ! wait "$pid"; then @@ -12,11 +12,11 @@ if [ ! "$(go env GOOS)" = 'windows' ]; then fi done - if [ -z "$DOCKER_TEST_HOST" ]; then + if [[ -z "$DOCKER_TEST_HOST" ]]; then # Stop apparmor if it is enabled - if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then + if [[ -e "/sys/module/apparmor/parameters/enabled" ]] && [[ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]]; then ( - [ -n "$TESTDEBUG" ] && set -x + [[ -n "$TESTDEBUG" ]] && set -x /etc/init.d/apparmor stop ) fi |
