From 992e0167e7eb685da57e4b88be34e35069237135 Mon Sep 17 00:00:00 2001 From: ldericher Date: Mon, 24 Aug 2020 17:43:14 +0200 Subject: [PATCH] Fixed problems with curl --- README.md | 2 +- example/kiwi.yml | 2 +- install.sh | 10 +++++----- kiwi | 4 ++-- src/etc/version_tag | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b63427a..37ecde2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The simple tool for managing container servers ## Installation ```shell script -curl 'https://raw.githubusercontent.com/ldericher/kiwi-config/master/install.sh' | sh +curl --proto '=https' --tlsv1.2 -sSf 'https://raw.githubusercontent.com/ldericher/kiwi-config/master/install.sh' | sh ``` That script checks for the basic dependencies of the `kiwi` command, then downloads the main script and installs it to a location of your choice. Please consider installing `kiwi` into a directory inside your $PATH. diff --git a/example/kiwi.yml b/example/kiwi.yml index 9965083..aa29362 100644 --- a/example/kiwi.yml +++ b/example/kiwi.yml @@ -2,7 +2,7 @@ # kiwi-config instance configuration # ###################################### -version: '0.0.1' +version: '0.0.2' runtime: storage: /tmp/kiwi diff --git a/install.sh b/install.sh index 3ee19c3..176dcf5 100755 --- a/install.sh +++ b/install.sh @@ -35,7 +35,7 @@ valid="no" while [ "${valid}" = "no" ]; do printf "Select installation directory [Default: '%s']: " "${install_dir_default}" - read install_dir + read install_dir /dev/null 2>/dev/null; then +if ! curl --proto '=https' --tlsv1.2 --silent --fail --output "${tmp_file}" "${uri}" >/dev/null 2>/dev/null; then rm "${tmp_file}" echo "Download 'kiwi' failed!" >/dev/stderr exit 1 fi -if ! install -m 0755 "${tmp_file}" "${install_dir}/kiwi"; then +if ! install -m 0755 "${tmp_file}" "${install_dir}/kiwi" >/dev/null 2>/dev/null; then rm "${tmp_file}" echo "Install 'kiwi' failed!" >/dev/stderr exit 1 @@ -82,4 +82,4 @@ rm "${tmp_file}" # finalization echo "OK" -exit 0 \ No newline at end of file +exit 0 diff --git a/kiwi b/kiwi index e4cb044..ae36536 100755 --- a/kiwi +++ b/kiwi @@ -84,8 +84,8 @@ if [ ! -x "$(kiwi_executable)" ]; then cd "${tmpdir}" || : # download archive - curl -o "kiwi-config.zip" "${KIWI_REPO}/archive/${KIWI_VERSION}.zip" - unzip "kiwi-config.zip" + curl --proto '=https' --tlsv1.2 --silent --fail --location --output "kiwi-config.zip" "${KIWI_REPO}/archive/${KIWI_VERSION}.zip" + unzip -qq "kiwi-config.zip" # read archive version tag cd "kiwi-config-${KIWI_VERSION}" || : diff --git a/src/etc/version_tag b/src/etc/version_tag index 8a9ecc2..7bcd0e3 100644 --- a/src/etc/version_tag +++ b/src/etc/version_tag @@ -1 +1 @@ -0.0.1 \ No newline at end of file +0.0.2 \ No newline at end of file