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 # # kiwi-config instance configuration #
###################################### ######################################
version: '0.0.3' version: '0.0.4'
runtime: runtime:
storage: /tmp/kiwi storage: /tmp/kiwi

View file

@ -6,6 +6,8 @@
# dependencies to run kiwi-config # dependencies to run kiwi-config
KIWI_DEPS="bash python3 pipenv less" KIWI_DEPS="bash python3 pipenv less"
# default install directory
INSTALL_DIR_DEFAULT="/usr/local/bin"
########## ##########
# CHECKS # # CHECKS #
@ -30,13 +32,12 @@ echo "OK"
######## ########
# prompt for installation directory # prompt for installation directory
install_dir_default="/usr/local/bin"
valid="no" 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 </dev/tty || install_dir="${install_dir_default}" 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
if [ -d "${install_dir}" ]; then 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" uri="https://raw.githubusercontent.com/ldericher/kiwi-config/master/kiwi"
tmp_file="$(mktemp)" 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}" rm "${tmp_file}"
echo "Download 'kiwi' failed!" >/dev/stderr echo "Download 'kiwi' failed!" >/dev/stderr
exit 1 exit 1

8
kiwi
View file

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

View file

@ -1 +1 @@
0.0.3 0.0.4