From 5c42b5e4fa5562616cddc7f18d368f147b04966b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 09 Oct 2012 21:27:57 -0400 Subject: Simplify and improve pathname pattern matching. --- diff --git a/src/oh-installfiles.sh b/src/oh-installfiles.sh index 082aae5..3a19928 100644 --- a/src/oh-installfiles.sh +++ b/src/oh-installfiles.sh @@ -44,12 +44,11 @@ main() chmod 755 "${pkg}.data" while IFS="${files_ifs}" read -r pattern; do - find 'dest' -path "${pattern}" | \ - while IFS="${files_ifs}" read -r file; do - file="${file#dest}" - mkdir -p "${pkg}.data/${file%/*}" - ln "${PWD}/dest/${file}" "${pkg}.data/${file}" - done + for file in dest/${pattern}; do + file="${file#dest}" + mkdir -p "${pkg}.data/${file%/*}" + ln "${PWD}/dest/${file}" "${pkg}.data/${file}" + done done <"../${pkg}.pkg/files" done } -- cgit v0.9.1