From: Michael Tremer Date: Mon, 11 Oct 2010 19:24:18 +0000 (+0200) Subject: Merge branch 'perl' into next X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2f76c9b4946465c8b056217b2fa767e6810e787;p=ipfire-3.x.git Merge branch 'perl' into next --- a2f76c9b4946465c8b056217b2fa767e6810e787 diff --cc tools/packager index 67e91b115,c1c07ff11..c998780d8 --- a/tools/packager +++ b/tools/packager @@@ -162,22 -131,19 +162,22 @@@ function __filelist() # Enable globbing again set +f - # If not paths were found take all files - [ -z "${paths}" ] && paths="${BUILDROOT}" + # If not paths were found -> break + [ -z "${paths}" ] && return - for file in $(find ${paths} 2>/dev/null | sort); do - # Remove ${BUILDROOT} - file="${file#${BUILDROOT}}" - - # Remove all leading slashes - while [ "${file:0:1}" = "/" ]; do - file="${file:1:${#file}}" - done + local excludes + if [ -n "${exclude_paths}" ]; then + excludes=$(find_files ${exclude_paths}) + fi - echo "${file}" + for file in $(find_files ${paths}); do + if [ -n "${excludes}" ]; then + if ! listmatch ${file} ${excludes}; then + echo "${file}" + fi + else + echo "${file}" + fi done }