Przeglądaj źródła

fixed curl checkers

Daniel Gibbs 9 lat temu
rodzic
commit
b486b1a5f7
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 2 2
      lgsm/functions/core_dl.sh
  2. 3 3
      linuxgsm.sh

+ 2 - 2
lgsm/functions/core_dl.sh

@@ -233,8 +233,8 @@ fn_update_function(){
 
 
 
 
 # Defines curl path
 # Defines curl path
-curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
-for curlpath in "${curlpaths}"
+curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)
+for curlpath in "${curl_paths_array}"
 do
 do
 	if [ -x "${curlpath}" ]; then
 	if [ -x "${curlpath}" ]; then
 		break
 		break

+ 3 - 3
linuxgsm.sh

@@ -63,9 +63,9 @@ fn_bootstrap_fetch_file(){
 		if [ ! -d "${local_filedir}" ]; then
 		if [ ! -d "${local_filedir}" ]; then
 			mkdir -p "${local_filedir}"
 			mkdir -p "${local_filedir}"
 		fi
 		fi
-		# Check curl exists and use available path
-		curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
-		for curlpath in ${curlpaths}
+		# Defines curl path
+		curl_paths_array=($(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)
+		for curlpath in "${curl_paths_array}"
 		do
 		do
 			if [ -x "${curlpath}" ]; then
 			if [ -x "${curlpath}" ]; then
 				break
 				break