From ab1b98923064e84686fbd12e93a3b0ee404e86c9 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 6 Jul 2024 09:33:04 +0200 Subject: Linux/MacOSX: during build, fallback to /tmp if wxWidgets sources not found in parent directory --- src/Build/build_cmake_rpm.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Build/build_cmake_rpm.sh') diff --git a/src/Build/build_cmake_rpm.sh b/src/Build/build_cmake_rpm.sh index 938bf40f..247c1e5e 100644 --- a/src/Build/build_cmake_rpm.sh +++ b/src/Build/build_cmake_rpm.sh @@ -18,8 +18,20 @@ export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + # The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH -- cgit v1.2.3