Quellcode durchsuchen

* Autodetectar ejecutables

guzman vor 6 Jahren
Ursprung
Commit
25a94e1830
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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)