Explorar el Código

Only modify cryfs-name.desktop if not exist

Guzmán Castanedo Villalba hace 6 años
padre
commit
e386a991eb
Se han modificado 1 ficheros con 10 adiciones y 9 borrados
  1. 10 9
      cryfs-automount

+ 10 - 9
cryfs-automount

@@ -72,16 +72,17 @@ function createautostart {
 			printf "\tUse a diferent name.\n"
 			exit 1
 		fi
+	else
+		echo "[Desktop Entry]" | tee $startfile > /dev/null
+		echo "Type=Application" | tee -a $startfile > /dev/null
+		echo "Exec=$(basename "$0") -b $1 -m $2 -c $3 -p $4 $5" | tee -a $startfile > /dev/null
+		echo "X-GNOME-Autostart-enabled=true" | tee -a $startfile > /dev/null
+		echo "NoDisplay=false" | tee -a $startfile > /dev/null
+		echo "Hidden=false" | tee -a $startfile > /dev/null
+		echo "Name=CryFS-Dropbox" | tee -a $startfile > /dev/null
+		echo "Comment=Automount CryFS for Dropbox" | tee -a $startfile > /dev/null
+		echo "X-GNOME-Autostart-Delay=0" | tee -a $startfile > /dev/null
 	fi
-	echo "[Desktop Entry]" | tee $startfile > /dev/null
-	echo "Type=Application" | tee -a $startfile > /dev/null
-	echo "Exec=$(basename "$0") -b $1 -m $2 -c $3 -p $4 $5" | tee -a $startfile > /dev/null
-	echo "X-GNOME-Autostart-enabled=true" | tee -a $startfile > /dev/null
-	echo "NoDisplay=false" | tee -a $startfile > /dev/null
-	echo "Hidden=false" | tee -a $startfile > /dev/null
-	echo "Name=CryFS-Dropbox" | tee -a $startfile > /dev/null
-	echo "Comment=Automount CryFS for Dropbox" | tee -a $startfile > /dev/null
-	echo "X-GNOME-Autostart-Delay=0" | tee -a $startfile > /dev/null
 }
 
 function printpaths {