Skip to content

Commit 6c71bc5

Browse files
committed
Fix CI workflows for themes with spaces in name
1 parent 09a9e23 commit 6c71bc5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/themes-screenshot-on-pr.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
do
3232
if test -f "$dir/theme.yaml"; then
3333
# Keep only folder name
34-
theme=`basename ${dir%*/}`
34+
theme=`basename "${dir%*/}"`
3535
3636
# Setup selected theme in config.yaml
3737
echo "Using theme $theme"
38-
sed -i "/THEME:/c\ THEME: $theme" config.yaml
38+
sed -i '/THEME:/c\ THEME: "'"$theme"'"' config.yaml
3939
4040
# For tests there is no real HW: use simulated LCD mode
4141
# Check if theme is for 5"
42-
orientation=$(grep 'DISPLAY_SIZE' $dir/theme.yaml | sed 's/ //g')
42+
orientation=$(grep 'DISPLAY_SIZE' "$dir/theme.yaml" | sed 's/ //g')
4343
if [ "$orientation" == "DISPLAY_SIZE:5\"" ]; then
4444
sed -i "/REVISION:/c\ REVISION: SIMU5" config.yaml
4545
else

.github/workflows/themes-screenshot-on-push.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ jobs:
4242
do
4343
if test -f "$dir/theme.yaml"; then
4444
# Keep only folder name
45-
theme=`basename ${dir%*/}`
45+
theme=`basename "${dir%*/}"`
4646
4747
# Setup selected theme in config.yaml
4848
echo "Using theme $theme"
49-
sed -i "/THEME:/c\ THEME: $theme" config.yaml
50-
49+
sed -i '/THEME:/c\ THEME: "'"$theme"'"' config.yaml
50+
5151
# For tests there is no real HW: use simulated LCD mode
5252
# Check if theme is for 5"
53-
orientation=$(grep 'DISPLAY_SIZE' $dir/theme.yaml | sed 's/ //g')
53+
orientation=$(grep 'DISPLAY_SIZE' "$dir/theme.yaml" | sed 's/ //g')
5454
if [ "$orientation" == "DISPLAY_SIZE:5\"" ]; then
5555
sed -i "/REVISION:/c\ REVISION: SIMU5" config.yaml
5656
else

0 commit comments

Comments
 (0)