debian: cleanup; everything working except whonix template update
This commit is contained in:
parent
d6d22e875e
commit
80caa5ea2e
31
functions.sh
31
functions.sh
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# vim: set ts=4 sw=4 sts=4 et :
|
# vim: set ts=4 sw=4 sts=4 et :
|
||||||
|
|
||||||
# XXX
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -77,22 +76,10 @@ fi
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Only output text under certain conditions
|
# Only output text under certain conditions
|
||||||
output() {
|
output() {
|
||||||
case ${VERBOSE} in
|
if [ "${VERBOSE}" -ge 1 ]; then
|
||||||
0)
|
# Don't echo if -x is set since it will already be displayed via true
|
||||||
true "${1}"
|
[[ ${-/x} != $- ]] || echo -e "${1}"
|
||||||
;;
|
fi
|
||||||
1)
|
|
||||||
echo -e "${1}"
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
# Don't echo if -x is set since it will already be displayed via true
|
|
||||||
[[ ${-/x} != $- ]] || echo -e "${1}"
|
|
||||||
true "${1}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
true "${1}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
info() {
|
info() {
|
||||||
@ -252,7 +239,6 @@ templateDir() {
|
|||||||
for element in "${TEMPLATE_FLAVOR_DIR[@]}"
|
for element in "${TEMPLATE_FLAVOR_DIR[@]}"
|
||||||
do
|
do
|
||||||
# (wheezy+whonix-gateway / wheezy+whonix-gateway+gnome[+++] / wheezy+gnome )
|
# (wheezy+whonix-gateway / wheezy+whonix-gateway+gnome[+++] / wheezy+gnome )
|
||||||
#if [ "${element%:*}" == "$(templateFlavorPrefix ${template_flavor})${template_flavor}" ]; then
|
|
||||||
if [ "${element%:*}" == "$(templateName ${template_flavor})" ]; then
|
if [ "${element%:*}" == "$(templateName ${template_flavor})" ]; then
|
||||||
eval echo -e ${element#*:}
|
eval echo -e ${element#*:}
|
||||||
return
|
return
|
||||||
@ -300,8 +286,8 @@ buildStepExec() {
|
|||||||
|
|
||||||
script="$(templateFile "${filename}" "${suffix}" "${template_flavor}")"
|
script="$(templateFile "${filename}" "${suffix}" "${template_flavor}")"
|
||||||
|
|
||||||
#if [ -f "${script}" ]; then
|
|
||||||
if [ -f "${script}" ] && [ ! ${GLOBAL_CACHE[$script]+_} ]; then
|
if [ -f "${script}" ] && [ ! ${GLOBAL_CACHE[$script]+_} ]; then
|
||||||
|
|
||||||
# Test module expects raw output back only used to asser test results
|
# Test module expects raw output back only used to asser test results
|
||||||
if [[ -n ${TEST} ]]; then
|
if [[ -n ${TEST} ]]; then
|
||||||
echo "${script}"
|
echo "${script}"
|
||||||
@ -387,13 +373,6 @@ getFileLocations() {
|
|||||||
local suffix="$3"
|
local suffix="$3"
|
||||||
local function="templateFile"
|
local function="templateFile"
|
||||||
|
|
||||||
|
|
||||||
#IFS_orig="${IFS}}"; IFS=$'\n'
|
|
||||||
#files=( $(callTemplateFunction "${filename}" "${suffix}" "${function}") )
|
|
||||||
#setArrayAsGlobal files $return_global_var
|
|
||||||
|
|
||||||
# XXX
|
|
||||||
#files=$(callTemplateFunction "${filename}" "${suffix}" "${function}")
|
|
||||||
files="$(callTemplateFunction "${filename}" "${suffix}" "${function}")"
|
files="$(callTemplateFunction "${filename}" "${suffix}" "${function}")"
|
||||||
|
|
||||||
IFS_orig="${IFS}}"; IFS=$'\n'
|
IFS_orig="${IFS}}"; IFS=$'\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user