summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/architecture.sh2
-rwxr-xr-xfunctions/arguments.sh2
-rwxr-xr-xfunctions/breakpoints.sh2
-rwxr-xr-xfunctions/chroot.sh2
-rwxr-xr-xfunctions/conffile.sh4
-rwxr-xr-xfunctions/defaults.sh2
-rwxr-xr-xfunctions/echo.sh21
-rwxr-xr-xfunctions/help.sh1
-rwxr-xr-xfunctions/losetup.sh4
-rwxr-xr-xfunctions/packages.sh2
-rwxr-xr-xfunctions/stagefile.sh8
-rwxr-xr-xfunctions/templates.sh4
-rwxr-xr-xfunctions/usage.sh1
-rwxr-xr-xfunctions/version.sh1
14 files changed, 31 insertions, 25 deletions
diff --git a/functions/architecture.sh b/functions/architecture.sh
index 4914f9a..3de2e5b 100755
--- a/functions/architecture.sh
+++ b/functions/architecture.sh
@@ -25,7 +25,7 @@ Check_architecture ()
if [ "${VALID}" = "false" ]
then
- Echo_warning "skipping ${0}, foreign architecture."
+ Echo_warning "skipping %s, foreign architecture." "${0}"
exit 0
fi
}
diff --git a/functions/arguments.sh b/functions/arguments.sh
index 93f4a06..0ac1bf2 100755
--- a/functions/arguments.sh
+++ b/functions/arguments.sh
@@ -75,7 +75,7 @@ Arguments ()
;;
*)
- Echo_error "internal error ${0}"
+ Echo_error "internal error %s" "${0}"
exit 1
;;
esac
diff --git a/functions/breakpoints.sh b/functions/breakpoints.sh
index 610e77c..feaaea7 100755
--- a/functions/breakpoints.sh
+++ b/functions/breakpoints.sh
@@ -13,7 +13,7 @@ Breakpoint ()
if [ "${LH_BREAKPOINTS}" = "enabled" ]
then
- Echo_message "Waiting at ${NAME}"
+ Echo_message "Waiting at %s" "${NAME}"
read WAIT
fi
}
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 55e0fbe..227f792 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -14,7 +14,7 @@ Chroot ()
COMMANDS="${@}"
# Executing commands in chroot
- Echo_debug "Executing: ${COMMANDS}"
+ Echo_debug "Executing: %s" "${COMMANDS}"
if [ "${LH_USE_FAKEROOT}" != "enabled" ]
then
diff --git a/functions/conffile.sh b/functions/conffile.sh
index d48d454..42a87e7 100755
--- a/functions/conffile.sh
+++ b/functions/conffile.sh
@@ -30,10 +30,10 @@ Read_conffile ()
then
if [ -r "${CONFFILE}" ]
then
- Echo_debug "Reading configuration file ${CONFFILE}"
+ Echo_debug "Reading configuration file %s" "${CONFFILE}"
. "${CONFFILE}"
else
- Echo_warning "Failed to read configuration file ${CONFFILE}"
+ Echo_warning "Failed to read configuration file %s" "${CONFFILE}"
fi
fi
done
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 1add262..afd5ef1 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -681,7 +681,7 @@ Check_defaults ()
then
if [ "${LH_APT}" = "aptitude" ]
then
- Echo_warning "You selected LH_PACKAGES_LISTS='"${LH_PACKAGES_LIST}"' and LH_APT='aptitude'"
+ Echo_warning "You selected LH_PACKAGES_LISTS='%s' and LH_APT='aptitude'" "${LH_PACKAGES_LIST}"
Echo_warning "This is a possible unsafe configuration as aptitude is not"
Echo_warning "used in the stripped/minimal package lists."
fi
diff --git a/functions/echo.sh b/functions/echo.sh
index 808cd0e..d865ddb 100755
--- a/functions/echo.sh
+++ b/functions/echo.sh
@@ -12,57 +12,60 @@ set -e
Echo_debug ()
{
STRING="${1}"
+ shift
if [ "${LH_DEBUG}" = "enabled" ]
then
- echo "D: ${STRING}"
+ printf "D: $(eval_gettext "${STRING}")" "${@}"; echo;
fi
}
Echo_error ()
{
STRING="${1}"
+ shift
- echo "E: ${STRING}" >&2
+ (printf "E: $(eval_gettext "${STRING}")" "${@}"; echo;) >&2
}
Echo_message ()
{
STRING="${1}"
+ shift
if [ "${LH_QUIET}" != "enabled" ]
then
- echo "P: ${STRING}"
+ printf "P: $(eval_gettext "${STRING}")" "${@}"; echo;
fi
}
Echo_verbose ()
{
STRING="${1}"
+ shift
if [ "${LH_VERBOSE}" = "enabled" ]
then
- echo "I: ${STRING}"
+ printf "I: $(eval_gettext "${STRING}")" "${@}"; echo;
fi
}
Echo_warning ()
{
STRING="${1}"
+ shift
- echo "W: ${STRING}"
+ printf "W: $(eval_gettext "${STRING}")" "${@}"; echo;
}
Echo_breakage ()
{
- Echo_message "If the following stage fails, the most likely cause of the problem is with"
-
case "${LH_DISTRIBUTION}" in
sid|unstable)
- Echo_message "your mirror configuration, a caching proxy or the sid distribution."
+ Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration, a caching proxy or the sid distribution."
;;
*)
- Echo_message "your mirror configuration or a caching proxy."
+ Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy."
;;
esac
diff --git a/functions/help.sh b/functions/help.sh
index 16d67ae..57a1158 100755
--- a/functions/help.sh
+++ b/functions/help.sh
@@ -9,6 +9,7 @@
set -e
+#FIXME: put this in l10n standard
Help ()
{
echo "${PROGRAM} - ${DESCRIPTION}"
diff --git a/functions/losetup.sh b/functions/losetup.sh
index d956086..233e637 100755
--- a/functions/losetup.sh
+++ b/functions/losetup.sh
@@ -23,14 +23,14 @@ Losetup ()
if [ "${PARTITION}" = "0" ]
then
- Echo_message "Mounting ${DEVICE} with offset 0"
+ Echo_message "Mounting %s with offset 0" "${DEVICE}"
${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
else
SECTORS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")"
OFFSET="$(expr ${SECTORS} '*' 512)"
- Echo_message "Mounting ${DEVICE} with offset ${OFFSET}"
+ Echo_message "Mounting %s with offset %s" "${DEVICE}" "${OFFSET}"
${LH_ROOT_COMMAND} ${LH_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}"
fi
diff --git a/functions/packages.sh b/functions/packages.sh
index 1427d6c..034f571 100755
--- a/functions/packages.sh
+++ b/functions/packages.sh
@@ -22,7 +22,7 @@ Check_package ()
;;
2)
- Echo_error "You need to install ${PACKAGE} on your host system."
+ Echo_error "You need to install %s on your host system." "${PACKAGE}"
exit 1
;;
esac
diff --git a/functions/stagefile.sh b/functions/stagefile.sh
index a098a49..f84de4d 100755
--- a/functions/stagefile.sh
+++ b/functions/stagefile.sh
@@ -20,11 +20,11 @@ Check_stagefile ()
if [ "${LH_FORCE}" != "enabled" ]
then
# Skipping execution
- Echo_warning "skipping ${NAME}"
+ Echo_warning "skipping %s" "${NAME}"
exit 0
else
# Forcing execution
- Echo_message "forcing ${NAME}"
+ Echo_message "forcing %s" "${NAME}"
rm -f "${FILE}"
fi
fi
@@ -62,9 +62,9 @@ Require_stagefile ()
then
if [ "${NUMBER}" -eq 1 ]
then
- Echo_error "${NAME}: ${FILE} missing"
+ Echo_error "%s: %s missing" "${NAME}" "${FILE}"
else
- Echo_error "${NAME}: one of ${FILES} is missing"
+ Echo_error "%s: one of %s is missing" "${NAME}" "${FILES}"
fi
exit 1
diff --git a/functions/templates.sh b/functions/templates.sh
index 09b1662..8f67a66 100755
--- a/functions/templates.sh
+++ b/functions/templates.sh
@@ -20,7 +20,7 @@ Check_templates ()
then
LH_TEMPLATES=config/templates
else
- Echo_error "templates not accessible in ${LH_TEMPLATES} nor config/templates"
+ Echo_error "templates not accessible in %s nor config/templates" "${LH_TEMPLATES}"
exit 1
fi
fi
@@ -29,7 +29,7 @@ Check_templates ()
then
TEMPLATES="${LH_TEMPLATES}/${PACKAGE}"
else
- Echo_error "${PACKAGE} templates not accessible in ${LH_TEMPLATES}"
+ Echo_error "%s templates not accessible in %s" "${PACKAGE}" "${LH_TEMPLATES}"
exit 1
fi
}
diff --git a/functions/usage.sh b/functions/usage.sh
index 0d9adc3..95586ad 100755
--- a/functions/usage.sh
+++ b/functions/usage.sh
@@ -9,6 +9,7 @@
set -e
+#FIXME: put this in l10n standard
Usage ()
{
echo "${PROGRAM} - ${DESCRIPTION}"
diff --git a/functions/version.sh b/functions/version.sh
index e7edc11..f5b66d6 100755
--- a/functions/version.sh
+++ b/functions/version.sh
@@ -9,6 +9,7 @@
set -e
+#FIXME: put this in l10n standard
Version ()
{
echo "${PROGRAM}, version ${VERSION}"