VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Build/build_veracrypt_freebsd.sh
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-07-06 09:33:04 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-07-06 09:33:04 +0200
commitab1b98923064e84686fbd12e93a3b0ee404e86c9 (patch)
tree7a9ca1b25b25975b39aec4343d6cd6b1602a9368 /src/Build/build_veracrypt_freebsd.sh
parent3095fc265a2c4104953abc664a8640efb900e897 (diff)
downloadVeraCrypt-ab1b98923064e84686fbd12e93a3b0ee404e86c9.tar.gz
VeraCrypt-ab1b98923064e84686fbd12e93a3b0ee404e86c9.zip
Linux/MacOSX: during build, fallback to /tmp if wxWidgets sources not found in parent directory
Diffstat (limited to 'src/Build/build_veracrypt_freebsd.sh')
-rwxr-xr-xsrc/Build/build_veracrypt_freebsd.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Build/build_veracrypt_freebsd.sh b/src/Build/build_veracrypt_freebsd.sh
index fe7f1f84..00fbdd0a 100755
--- a/src/Build/build_veracrypt_freebsd.sh
+++ b/src/Build/build_veracrypt_freebsd.sh
@@ -21,8 +21,20 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
-# the sources of wxWidgets 3.2.5 must be extracted to the parent directory
+# 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