Bladeren bron

* Autodetectar ejecutables

guzman 5 jaren geleden
bovenliggende
commit
25a94e1830
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      cryfs-automount

+ 2 - 2
cryfs-automount

@@ -175,14 +175,14 @@ fi
 name=$1
 
 #Check if cryfs is installed
-if [ ! -x /usr/local/bin/cryfs ]; then
+if [ ! -x "$(which cryfs)" ]; then
 	echo "ERROR: CryFS is not installed."
 	echo "https://www.cryfs.org/#download"
 	exit 1
 fi
 
 #Check if cryfs-automount is installed
-if [ ! -x /usr/local/bin/$(basename "$0") ]; then
+if [ ! -x "$(which $(basename "$0"))" ]; then
 	echo "WARNING: "$(basename "$0")" is not installed."
 	echo "We'll use root access only for installation."
 	test=$(sudo whoami)