deleted crude bash version

This commit is contained in:
Jörn-Michael Miehe 2020-08-06 14:39:12 +02:00
parent 69dc1fd213
commit 26cac6c079
4 changed files with 0 additions and 95 deletions

View file

@ -1,59 +0,0 @@
#!/bin/bash
source "${KIWI_ROOT}/inc/functions.sh"
# read default baseconfig
conf_VERSION="${KIWI_VERSION}"
read_kiwi_config "${KIWI_ROOT}/etc/default.${KIWI_CONF_NAME}"
# if pwd is a kiwi folder, read local baseconfig
if [ -f "./${KIWI_CONF_NAME}" ]; then
echo "[WARN] Overwriting existing '${KIWI_CONF_NAME}'"
read_kiwi_config "./${KIWI_CONF_NAME}"
fi
function user_input() {
local prompt="${1}"
local varname="${2}"
local input
read -p "${prompt} [Default '${!varname}']: " input
eval "${varname}='${input:-${!varname}}'"
}
declare -A config_explain
config_explain=(
[VERSION]="kiwi-config version"
[SUFFIX_PROJECT]="suffix for project directories"
[SUFFIX_DOWN]="suffix for disabled projects"
)
for varname in "${!config_explain[@]}"; do
echo "${varname}"
user_input "Enter ${config_explain[${varname}]}" conf_${varname}
done
exit 0
user_input "Choose kiwi-config version" conf_VERSION
user_input "Enter suffix for project directories" conf_SUFFIX_PROJECT
user_input "Enter suffix for disabled projects" conf_SUFFIX_DOWN
user_input "Enter suffix for disabled projects" conf_SUFFIX_DOWN
user_input "Enter suffix for disabled projects" conf_SUFFIX_DOWN
user_input "Enter suffix for disabled projects" conf_SUFFIX_DOWN
echo "conf_VERSION: ${conf_VERSION}"
echo "conf_SUFFIX_PROJECT: ${conf_SUFFIX_PROJECT}"
exit 0
read -p "Choose kiwi-config version [Default '${conf_version}']: " kiwi_VERSION
conf_VERSION=${kiwi_VERSION:-${conf_VERSION}}
read -p "suffix for kiwi-config version to use [Default '${conf_version}']: " kiwi_suffix_project
echo "conf_VERSION: ${conf_VERSION}"

View file

@ -1,14 +0,0 @@
#!/bin/bash
command="${1}"
shift 1
case "${command}" in
"init")
exec "${KIWI_ROOT}/bin/${command}.sh" "${@}"
;;
*)
echo "Unknown kiwi command '${command}'."
exit 1
;;
esac

View file

@ -1,7 +0,0 @@
SUFFIX_PROJECT=.project
SUFFIX_DOWN=.down
DOCKERNET=kiwinet
DOCKERCIDR=10.22.46.0/24
TARGETROOT=/var/kiwi

View file

@ -1,15 +0,0 @@
#!/bin/bash
function read_kiwi_config() {
local conf_file="${1}"
local conf_prefix="${2:-conf_}"
local conf_file_content=$(sed -r 's/^\s*(\S+)/'${conf_prefix}'\1/g' "${conf_file}")
eval "${conf_file_content}"
}
function write_kiwi_config() {
local conf_prefix="${2:-conf_}"
}