use declare instead of local

This commit is contained in:
Jack L. Frost 2015-02-10 16:51:20 +03:00
parent 30ff0776d6
commit 795078cb2b

4
sup
View File

@ -49,7 +49,7 @@ sup.mktemp() {
} }
sup.scrot() { sup.scrot() {
local tmp_file declare tmp_file
[[ "$scrot_exec" ]] || { scrot_exec=$(type -P scrot); } [[ "$scrot_exec" ]] || { scrot_exec=$(type -P scrot); }
[[ "$scrot_exec" ]] || { [[ "$scrot_exec" ]] || {
@ -78,7 +78,7 @@ sup.exclude() {
sup.if_url() { echo "$1" | grep -oE "$cfg_url_regex" &>/dev/null; } sup.if_url() { echo "$1" | grep -oE "$cfg_url_regex" &>/dev/null; }
sup.mktemp() { sup.mktemp() {
local tmp_file_name tmp_file_name_extra="$2" tmp_dir="$1" declare tmp_file_name tmp_file_name_extra="$2" tmp_dir="$1"
[[ -d "$tmp_dir" ]] || { [[ -d "$tmp_dir" ]] || {
sup.err "${tmp_dir} does not exist or is not a directory." sup.err "${tmp_dir} does not exist or is not a directory."