mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-21 20:33:00 +00:00
Fixed problems with curl
This commit is contained in:
parent
ef918af0f9
commit
992e0167e7
5 changed files with 10 additions and 10 deletions
|
@ -13,7 +13,7 @@ The simple tool for managing container servers
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```shell script
|
```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.
|
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.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# kiwi-config instance configuration #
|
# kiwi-config instance configuration #
|
||||||
######################################
|
######################################
|
||||||
|
|
||||||
version: '0.0.1'
|
version: '0.0.2'
|
||||||
|
|
||||||
runtime:
|
runtime:
|
||||||
storage: /tmp/kiwi
|
storage: /tmp/kiwi
|
||||||
|
|
10
install.sh
10
install.sh
|
@ -35,7 +35,7 @@ valid="no"
|
||||||
|
|
||||||
while [ "${valid}" = "no" ]; do
|
while [ "${valid}" = "no" ]; do
|
||||||
printf "Select installation directory [Default: '%s']: " "${install_dir_default}"
|
printf "Select installation directory [Default: '%s']: " "${install_dir_default}"
|
||||||
read install_dir
|
read install_dir </dev/tty || install_dir="${install_dir_default}"
|
||||||
install_dir="${install_dir:-${install_dir_default}}"
|
install_dir="${install_dir:-${install_dir_default}}"
|
||||||
|
|
||||||
# check
|
# check
|
||||||
|
@ -44,7 +44,7 @@ while [ "${valid}" = "no" ]; do
|
||||||
|
|
||||||
else
|
else
|
||||||
printf "Install directory doesn't exist. Try creating? [Y|n] "
|
printf "Install directory doesn't exist. Try creating? [Y|n] "
|
||||||
read yesno
|
read yesno </dev/tty || yesno="yes"
|
||||||
if [ ! "${yesno}" = "N" ] || [ ! "${yesno}" = "n" ]; then
|
if [ ! "${yesno}" = "N" ] || [ ! "${yesno}" = "n" ]; then
|
||||||
|
|
||||||
# check creation failure
|
# check creation failure
|
||||||
|
@ -66,13 +66,13 @@ printf "Installing into '%s' ... " "${install_dir}"
|
||||||
uri="https://raw.githubusercontent.com/ldericher/kiwi-config/master/kiwi"
|
uri="https://raw.githubusercontent.com/ldericher/kiwi-config/master/kiwi"
|
||||||
tmp_file="$(mktemp)"
|
tmp_file="$(mktemp)"
|
||||||
|
|
||||||
if ! curl -o "${tmp_file}" "${uri}" >/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}"
|
rm "${tmp_file}"
|
||||||
echo "Download 'kiwi' failed!" >/dev/stderr
|
echo "Download 'kiwi' failed!" >/dev/stderr
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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}"
|
rm "${tmp_file}"
|
||||||
echo "Install 'kiwi' failed!" >/dev/stderr
|
echo "Install 'kiwi' failed!" >/dev/stderr
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -82,4 +82,4 @@ rm "${tmp_file}"
|
||||||
|
|
||||||
# finalization
|
# finalization
|
||||||
echo "OK"
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
4
kiwi
4
kiwi
|
@ -84,8 +84,8 @@ if [ ! -x "$(kiwi_executable)" ]; then
|
||||||
cd "${tmpdir}" || :
|
cd "${tmpdir}" || :
|
||||||
|
|
||||||
# download archive
|
# download archive
|
||||||
curl -o "kiwi-config.zip" "${KIWI_REPO}/archive/${KIWI_VERSION}.zip"
|
curl --proto '=https' --tlsv1.2 --silent --fail --location --output "kiwi-config.zip" "${KIWI_REPO}/archive/${KIWI_VERSION}.zip"
|
||||||
unzip "kiwi-config.zip"
|
unzip -qq "kiwi-config.zip"
|
||||||
|
|
||||||
# read archive version tag
|
# read archive version tag
|
||||||
cd "kiwi-config-${KIWI_VERSION}" || :
|
cd "kiwi-config-${KIWI_VERSION}" || :
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.0.1
|
0.0.2
|
Loading…
Reference in a new issue