Skip to content

Commit ecb0b99

Browse files
committed
follow shellchecks recommendations to quote everything
and also add a shebang where previously was none.
1 parent a30eedc commit ecb0b99

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
# https://stackoverflow.com/a/51761312/4934537
55
latest_release=$(git ls-remote --tags --refs --sort="v:refname" https://github.com/MichMich/MagicMirror.git | tail -n1 | sed 's/.*\///')
66
if [ "$(docker manifest inspect bastilimbach/docker-magicmirror:"${latest_release}" > /dev/null; echo $?)" != 0 ]; then
7-
docker buildx build --progress plain --platform=linux/amd64,linux/arm64,linux/arm/v7 ${1} --build-arg branch="${latest_release}" -t bastilimbach/docker-magicmirror:"${latest_release}" -t bastilimbach/docker-magicmirror:latest .
7+
docker buildx build --progress plain --platform=linux/amd64,linux/arm64,linux/arm/v7 "${1}" --build-arg branch="${latest_release}" -t bastilimbach/docker-magicmirror:"${latest_release}" -t bastilimbach/docker-magicmirror:latest .
88
fi
99

10-
docker buildx build --progress plain --platform=linux/amd64,linux/arm64,linux/arm/v7 ${1} --build-arg branch=develop -t bastilimbach/docker-magicmirror:develop .
10+
docker buildx build --progress plain --platform=linux/amd64,linux/arm64,linux/arm/v7 "${1}" --build-arg branch=develop -t bastilimbach/docker-magicmirror:develop .

test-build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
rm -rf ./config
24
rm -rf ./modules
35
mkdir config
@@ -8,7 +10,7 @@ docker build -t mm:latest .
810
docker run -d \
911
--publish 80:8080 \
1012
--restart always \
11-
--volume $PWD/config:/opt/magic_mirror/config \
12-
--volume $PWD/modules:/opt/magic_mirror/modules \
13+
--volume "$PWD"/config:/opt/magic_mirror/config \
14+
--volume "$PWD"/modules:/opt/magic_mirror/modules \
1315
--name magic_mirror \
1416
mm:latest

0 commit comments

Comments
 (0)