gendiff: use shell pattern to strip suffix

This commit is contained in:
Alexey Tourbin 2007-01-24 20:15:34 +03:00
parent ac0e78e658
commit f913650145

View File

@ -53,7 +53,7 @@ fi
find "$1" -mindepth 1 \( -name "*$2" -o -name ".*$2" \) -print | find "$1" -mindepth 1 \( -name "*$2" -o -name ".*$2" \) -print |
LC_COLLATE=C sort -u | LC_COLLATE=C sort -u |
while read -r fin; do while read -r fin; do
fou=`echo "$fin" |sed -e "s/$2\$//"` fou="${fin%$2}"
[ -r "$fin" ] || fin="/dev/null" [ -r "$fin" ] || fin="/dev/null"
[ -r "$fou" ] || fou="/dev/null" [ -r "$fou" ] || fou="/dev/null"
if [ -n "$patch" ]; then if [ -n "$patch" ]; then