🔧 Fix shellcheck issues [run-ci]
This commit is contained in:
@@ -62,8 +62,8 @@ function cleanup {
|
||||
trap cleanup EXIT
|
||||
|
||||
# Reduce the size of the screen capture and the target to optimize the search performance.
|
||||
convert ${SCREEN} -resize $((100 / SCALE_FACTOR))% "${WORK_DIR}/screen_small.png"
|
||||
convert ${TARGET} -resize $((100 / SCALE_FACTOR))% "${WORK_DIR}/target_small.png"
|
||||
convert "${SCREEN}" -resize $((100 / SCALE_FACTOR))% "${WORK_DIR}/screen_small.png"
|
||||
convert "${TARGET}" -resize $((100 / SCALE_FACTOR))% "${WORK_DIR}/target_small.png"
|
||||
|
||||
# Make a search on the reduced images.
|
||||
RESULT=$(compare -metric MSE -subimage-search \
|
||||
@@ -104,7 +104,7 @@ convert "${SCREEN}" -crop ${CROP_WIDTH}x${CROP_HEIGHT}+${CROP_X}+${CROP_Y} \
|
||||
+repage "${WORK_DIR}/screen_cropped.png"
|
||||
|
||||
# Search again on the full resolution.
|
||||
RESULT=$(compare -metric MSE -dissimilarity-threshold ${FUZZINESS} -subimage-search \
|
||||
RESULT=$(compare -metric MSE -dissimilarity-threshold "${FUZZINESS}" -subimage-search \
|
||||
"${WORK_DIR}/screen_cropped.png" "${TARGET}" "${WORK_DIR}/out.png" 2>&1)
|
||||
|
||||
if [[ $RESULT == *"error"* ]]; then
|
||||
|
||||
@@ -58,11 +58,6 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.." || \
|
||||
IMAGE="ghcr.io/schneegans/gnome-shell-pod-${FEDORA_VERSION}"
|
||||
EXTENSION="burn-my-windows@schneegans.github.com"
|
||||
|
||||
# All references images of the effects are captured at & cropped to this region
|
||||
# in the center of the screen. This is kind of arbitrary, but has been choosen so that
|
||||
# something is visible from each effect.
|
||||
CROP="100x100+910+480"
|
||||
|
||||
# Run the container. For more info, visit https://github.com/Schneegans/gnome-shell-pod.
|
||||
POD=$(podman run --rm --cap-add=SYS_NICE --cap-add=IPC_LOCK -td "${IMAGE}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user