From ee06c790c3e1c02414aeb7bea8ab28cec78112f7 Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Thu, 2 Apr 2026 23:23:09 -0300 Subject: [PATCH] build: Make generic CWD error message more consistent --- build/linux/appimage/3_dist-gimp-goappimage.sh | 2 +- build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh | 2 +- build/linux/snap/1_build-deps-snapcraft.sh | 2 +- build/linux/snap/2_build-gimp-snapcraft.sh | 2 +- build/linux/snap/3_dist-gimp-snapcraft.sh | 2 +- build/macos/dmg/3_dist-gimp-apple.sh | 2 +- build/windows/installer/3_dist-gimp-inno.ps1 | 2 +- build/windows/store/3_dist-gimp-winsdk.ps1 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/linux/appimage/3_dist-gimp-goappimage.sh b/build/linux/appimage/3_dist-gimp-goappimage.sh index 160c7a3bd1..81e945815e 100644 --- a/build/linux/appimage/3_dist-gimp-goappimage.sh +++ b/build/linux/appimage/3_dist-gimp-goappimage.sh @@ -19,7 +19,7 @@ case $(readlink /proc/$$/exe) in esac set -e if [ "$0" != 'build/linux/appimage/3_dist-gimp-goappimage.sh' ] && [ $(basename "$PWD") != 'appimage' ]; then - printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n' + printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n' exit 1 elif [ $(basename "$PWD") = 'appimage' ]; then cd ../../.. diff --git a/build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh b/build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh index 97d52235a5..0f4ddac8fe 100644 --- a/build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh +++ b/build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh @@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in esac set -e if [ "$0" != 'build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh' ] && [ $(basename "$PWD") != 'flatpak' ]; then - printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/linux/\n' + printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n' exit 1 elif [ $(basename "$PWD") = 'flatpak' ]; then cd ../../.. diff --git a/build/linux/snap/1_build-deps-snapcraft.sh b/build/linux/snap/1_build-deps-snapcraft.sh index 54c0e57e66..70524abbcc 100644 --- a/build/linux/snap/1_build-deps-snapcraft.sh +++ b/build/linux/snap/1_build-deps-snapcraft.sh @@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in esac set -e if [ "$0" != 'build/linux/snap/1_build-deps-snapcraft.sh' ] && [ $(basename "$PWD") != 'snap' ]; then - printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n' + printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n' exit 1 elif [ $(basename "$PWD") = 'snap' ]; then cd ../../.. diff --git a/build/linux/snap/2_build-gimp-snapcraft.sh b/build/linux/snap/2_build-gimp-snapcraft.sh index 667406d167..3282cbfb75 100644 --- a/build/linux/snap/2_build-gimp-snapcraft.sh +++ b/build/linux/snap/2_build-gimp-snapcraft.sh @@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in esac set -e if [ "$0" != 'build/linux/snap/2_build-gimp-snapcraft.sh' ] && [ $(basename "$PWD") != 'snap' ]; then - printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n' + printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n' exit 1 elif [ $(basename "$PWD") = 'snap' ]; then cd ../../.. diff --git a/build/linux/snap/3_dist-gimp-snapcraft.sh b/build/linux/snap/3_dist-gimp-snapcraft.sh index e418086bed..65b258d824 100644 --- a/build/linux/snap/3_dist-gimp-snapcraft.sh +++ b/build/linux/snap/3_dist-gimp-snapcraft.sh @@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in esac set -e if [ "$0" != 'build/linux/snap/3_dist-gimp-snapcraft.sh' ] && [ $(basename "$PWD") != 'snap' ]; then - printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n' + printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n' exit 1 elif [ $(basename "$PWD") = 'snap' ]; then cd ../../.. diff --git a/build/macos/dmg/3_dist-gimp-apple.sh b/build/macos/dmg/3_dist-gimp-apple.sh index f1ff06abab..766e38aad0 100644 --- a/build/macos/dmg/3_dist-gimp-apple.sh +++ b/build/macos/dmg/3_dist-gimp-apple.sh @@ -17,7 +17,7 @@ case $(readlink /proc/$$/exe) in esac set -e if [ "$0" != 'build/macos/dmg/3_dist-gimp-apple.sh' ] && [ $(basename "$PWD") != 'dmg' ]; then - printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n' + printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n' exit 1 elif [ $(basename "$PWD") = 'dmg' ]; then cd ../../.. diff --git a/build/windows/installer/3_dist-gimp-inno.ps1 b/build/windows/installer/3_dist-gimp-inno.ps1 index 7de3fcc616..5b13e03743 100644 --- a/build/windows/installer/3_dist-gimp-inno.ps1 +++ b/build/windows/installer/3_dist-gimp-inno.ps1 @@ -11,7 +11,7 @@ $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $false #to ensure error catching as in pre-7.4 PS if (-not (Test-Path build\windows\installer) -and -not (Test-Path 3_dist-gimp-inno.ps1 -Type Leaf) -or $PSScriptRoot -notlike "*build\windows\installer*") { - Write-Host '(ERROR): Script called from wrong dir. Please, call the script from gimp source.' -ForegroundColor Red + Write-Host '(ERROR): Script called from wrong dir. Please, call this script from the root of gimp source dir' -ForegroundColor Red exit 1 } elseif (Test-Path 3_dist-gimp-inno.ps1 -Type Leaf) diff --git a/build/windows/store/3_dist-gimp-winsdk.ps1 b/build/windows/store/3_dist-gimp-winsdk.ps1 index 6b54317491..d31df093a2 100644 --- a/build/windows/store/3_dist-gimp-winsdk.ps1 +++ b/build/windows/store/3_dist-gimp-winsdk.ps1 @@ -12,7 +12,7 @@ $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $false #to ensure error catching as in pre-7.4 PS if (-not (Test-Path build\windows\store) -and -not (Test-Path 3_dist-gimp-winsdk.ps1 -Type Leaf) -or $PSScriptRoot -notlike "*build\windows\store*") { - Write-Host '(ERROR): Script called from wrong dir. Please, call the script from gimp source.' -ForegroundColor Red + Write-Host '(ERROR): Script called from wrong dir. Please, call this script from the root of gimp source dir' -ForegroundColor Red exit 1 } elseif (Test-Path 3_dist-gimp-winsdk.ps1 -Type Leaf)