j
k
j a
j l
if [ -x "$(command -v apk)" ] then
=> 'if ...; then' 是不是会好看些?
apk add install -y curl elif [ -x "$(command -v yum)" ] then yum install -y curl elif [ -x "$(command -v apt-get)" ] then apt-get install -y curl fi +else echo "curl has install." +fi
apk add install -y curl
yum install -y curl
apt-get install -y curl
+else
+fi
Back to the thread
Back to the list