VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-13 23:34:04 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-13 23:34:04 +0200
commit440df023552a2a7dd9601067b96769d1eebf8506 (patch)
tree5582231874e4802d8887a05353de194a673dbec1 /src/Setup
parent4cc203e7b31703e7b5f905dc88805291c4a6dfab (diff)
downloadVeraCrypt-440df023552a2a7dd9601067b96769d1eebf8506.tar.gz
VeraCrypt-440df023552a2a7dd9601067b96769d1eebf8506.zip
Linux: Fix compatibility of generic installers with old Linux distros
In old Linux distributions, tar command doesn't support "--keep-directory-symlink" so we now dynamically detect if this switch is support and then we use it if it is available
Diffstat (limited to 'src/Setup')
-rw-r--r--src/Setup/Linux/veracrypt_install_template.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh
index 966e6f81..9f7a99de 100644
--- a/src/Setup/Linux/veracrypt_install_template.sh
+++ b/src/Setup/Linux/veracrypt_install_template.sh
@@ -32,7 +32,11 @@ KTERM=0
case $PACKAGE_TYPE in
tar)
PACKAGE_INSTALLER=tar
- PACKAGE_INSTALLER_OPTS='-C / --keep-directory-symlink --no-overwrite-dir -xpzvf'
+ if tar --help | grep -q -- '--keep-directory-symlink'; then
+ PACKAGE_INSTALLER_OPTS='-C / --keep-directory-symlink --no-overwrite-dir -xpzvf'
+ else
+ PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf'
+ fi
;;
esac