Procházet zdrojové kódy

try replacing cat with sed

UltimateByte před 9 roky
rodič
revize
b85a1bb18e
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      lgsm/functions/mods_core.sh

+ 2 - 1
lgsm/functions/mods_core.sh

@@ -160,7 +160,8 @@ fn_mod_copy_destination(){
 # Check if the mod is already installed and warn the user
 fn_mod_already_installed(){
 	if [ -f "${modslockfilefullpath}" ]; then
-		if [ -n "$(cat "${modslockfilefullpath}" | grep "${modcommand}")" ]; then
+	
+		if [ -n "$(sed -n "/^${modcommand}$/p" "${modslockfilefullpath}")" ]; then
 			fn_print_warning_nl "${modprettyname} has already been installed"
 			sleep 1
 			echo " * Config files, if any, might be overwritten."