From: Frank Terbeck Date: Sun, 16 Sep 2007 12:26:36 +0000 (+0200) Subject: script-functions: adjusted reverse_list's and is_older_than's indention X-Git-Tag: 0.3.27~4 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=8a5c5bfc49b435d904beb4c043ad56db77f739c7 script-functions: adjusted reverse_list's and is_older_than's indention Set to two spaces, just like the rest of the file. --- diff --git a/etc/grml/script-functions b/etc/grml/script-functions index 0a389e9..659054c 100644 --- a/etc/grml/script-functions +++ b/etc/grml/script-functions @@ -146,17 +146,17 @@ mount_sys(){ # Returns the reversed order of list # reverse_list() { - local ret - ret='' - while [ "$#" -gt 0 ] ; do - if [ -z "${ret}" ] ; then - ret="$1" - else - ret="$1 ${ret}" - fi - shift - done - printf '%s' "${ret}" + local ret + ret='' + while [ "$#" -gt 0 ] ; do + if [ -z "${ret}" ] ; then + ret="$1" + else + ret="$1 ${ret}" + fi + shift + done + printf '%s' "${ret}" } #}}} @@ -167,19 +167,19 @@ reverse_list() { # # EXAMPLE: if is_older_than a.out *.o ; then ... is_older_than() { - local x - local ref="$1" - shift + local x + local ref="$1" + shift - for x in "$@" ; do - [ "${x}" -nt "${ref}" ] && return 0 + for x in "$@" ; do + [ "${x}" -nt "${ref}" ] && return 0 - if [ -d "${x}" ] ; then - is_older_than "${ref}" "${x}"/* && return 0 - fi - done + if [ -d "${x}" ] ; then + is_older_than "${ref}" "${x}"/* && return 0 + fi + done - return 1 + return 1 } #}}}