Commit f0974523 authored by Tails developers's avatar Tails developers
Browse files

Use local variables in functions.

parent b7f390e3
...@@ -26,20 +26,20 @@ cleanup () { ...@@ -26,20 +26,20 @@ cleanup () {
} }
error () { error () {
CLI_TEXT="${0}: error: ${@}" local cli_text="${0}: error: ${@}"
DIALOG_TEXT= "${@} local dialog_text= "${@}
Unsafe Browser will exit now." Unsafe Browser will exit now."
echo "${CLI_TEXT}" >&2 echo "${cli_text}" >&2
zenity --error --title "" --text "${DIALOG_TEXT}" zenity --error --title "" --text "${dialog_text}"
cleanup cleanup
exit 1 exit 1
} }
warning () { warning () {
TEXT="${@}" local text="${@}"
echo "${0}: warning: ${TEXT}" >&2 echo "${0}: warning: ${text}" >&2
zenity --warning --title "" --text "${TEXT}" zenity --warning --title "" --text "${text}"
} }
# First make sure the user really wants this # First make sure the user really wants this
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment