From f989db8bb5c35e006c1e15319e18f65be13f52eb Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Sun, 16 Sep 2007 13:00:57 +0200 Subject: [PATCH] lsb-functions: removed dolisting() --- etc/grml/lsb-functions | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/etc/grml/lsb-functions b/etc/grml/lsb-functions index 4a27218..f565f0f 100644 --- a/etc/grml/lsb-functions +++ b/etc/grml/lsb-functions @@ -488,50 +488,6 @@ get_bootparam() { return ${retval} } -# Safer way to list the contents of a directory, -# as it do not have the "empty dir bug". -# -# char *dolisting(param) -# -# print a list of the directory contents -# -# NOTE: quote the params if they contain globs. -# also, error checking is not that extensive ... -# -dolisting() { - local x - local y - local tmpstr - local mylist - local mypath="$*" - - if [ "${mypath%/\*}" != "${mypath}" ] - then - mypath="${mypath%/\*}" - fi - - for x in ${mypath} - do - [ ! -e "${x}" ] && continue - - if [ ! -d "${x}" ] && ( [ -L "${x}" ] || [ -f "${x}" ] ) - then - mylist="${mylist} $(ls "${x}" 2> /dev/null)" - else - [ "${x%/}" != "${x}" ] && x="${x%/}" - - cd "${x}"; tmpstr="$(ls)" - - for y in ${tmpstr} - do - mylist="${mylist} ${x}/${y}" - done - fi - done - - printf "${mylist}\n" -} - # char *add_suffix(char * configfile) # # Returns a config file name with the softlevel suffix -- 2.1.4