From 52572ef7ee2a929089870274dd7e19f97490c18e Mon Sep 17 00:00:00 2001 From: poprhythm Date: Thu, 27 Nov 2025 02:42:20 +0000 Subject: [PATCH] Use relative paths for scripts --- zip_images_resize.sh | 3 ++- zip_images_resize_recursive.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zip_images_resize.sh b/zip_images_resize.sh index 57ca00a..c328fa6 100755 --- a/zip_images_resize.sh +++ b/zip_images_resize.sh @@ -51,7 +51,8 @@ for INFILE in "$@"; do cleanup_temp continue fi - ~/images_resize.sh + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + "$SCRIPT_DIR/images_resize.sh" popd > /dev/null # Zip the files with no compression diff --git a/zip_images_resize_recursive.sh b/zip_images_resize_recursive.sh index 2299247..4d92651 100755 --- a/zip_images_resize_recursive.sh +++ b/zip_images_resize_recursive.sh @@ -1,3 +1,4 @@ #!/bin/bash -find . -iname '*.zip' -exec ~/zip_images_resize.sh '{}' \; +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +find . -iname '*.zip' -exec "$SCRIPT_DIR/zip_images_resize.sh" '{}' \;