1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-12-25 02:23:01 +00:00

Merge branch 'release/0.0.4'

This commit is contained in:
Jörn-Michael Miehe 2020-08-24 20:19:06 +02:00
commit 9aa0e9dee0
4 changed files with 13 additions and 10 deletions

View file

@ -2,7 +2,7 @@
# kiwi-config instance configuration #
######################################
version: '0.0.3'
version: '0.0.4'
runtime:
storage: /tmp/kiwi

View file

@ -6,6 +6,8 @@
# dependencies to run kiwi-config
KIWI_DEPS="bash python3 pipenv less"
# default install directory
INSTALL_DIR_DEFAULT="/usr/local/bin"
##########
# CHECKS #
@ -30,13 +32,12 @@ echo "OK"
########
# prompt for installation directory
install_dir_default="/usr/local/bin"
valid="no"
while [ "${valid}" = "no" ]; do
printf "Select installation directory [Default: '%s']: " "${install_dir_default}"
read install_dir </dev/tty || install_dir="${install_dir_default}"
install_dir="${install_dir:-${install_dir_default}}"
printf "Select installation directory [Default: '%s']: " "${INSTALL_DIR_DEFAULT}"
read install_dir </dev/tty || install_dir="${INSTALL_DIR_DEFAULT}"
install_dir="${install_dir:-${INSTALL_DIR_DEFAULT}}"
# check
if [ -d "${install_dir}" ]; then
@ -66,7 +67,7 @@ printf "Installing into '%s' ... " "${install_dir}"
uri="https://raw.githubusercontent.com/ldericher/kiwi-config/master/kiwi"
tmp_file="$(mktemp)"
if ! curl --proto '=https' --tlsv1.2 --silent --fail --output "${tmp_file}" "${uri}" >/dev/null 2>/dev/null; then
if ! curl --proto '=https' --tlsv1.2 -sSf -o "${tmp_file}" "${uri}" >/dev/null 2>/dev/null; then
rm "${tmp_file}"
echo "Download 'kiwi' failed!" >/dev/stderr
exit 1

8
kiwi
View file

@ -84,8 +84,7 @@ if [ ! -x "$(kiwi_executable)" ]; then
cd "${tmpdir}" || :
# download archive
curl --proto '=https' --tlsv1.2 --silent --fail --location --output "kiwi-config.zip" "${KIWI_REPO}/archive/${KIWI_VERSION}.zip"
unzip -qq "kiwi-config.zip"
curl --proto '=https' --tlsv1.2 -sSfL -o "kiwi-config.zip" "${KIWI_REPO}/archive/${KIWI_VERSION}.zip" | tar xz
# read archive version tag
cd "kiwi-config-${KIWI_VERSION}" || :
@ -121,10 +120,13 @@ cd "${WORKDIR}" || :
# setup main environment
KIWI_ROOT="$(kiwi_root)"
PIPENV_VERBOSITY=-1
PIPENV_PIPFILE="$(kiwi_installdir)/Pipfile"
export KIWI_ROOT
export KIWI_CONF_NAME
export PIPENV_VERBOSITY=-1
export PIPENV_VERBOSITY
export PIPENV_PIPFILE
# run main script
exec pipenv run "$(kiwi_executable)" "${@}"

View file

@ -1 +1 @@
0.0.3
0.0.4