summaryrefslogtreecommitdiffstats
path: root/python/run-python-tests
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-03-02 10:34:20 +0000
committerRichard Jones <rjones@redhat.com>2010-03-02 10:34:20 +0000
commit4891ff9945177e8666af8381d1e0a54b8ce363e2 (patch)
treeeed4c5f2dc96e1ca506ee7ef4bb02d16db7f13eb /python/run-python-tests
parentd09a918e086c19b133fc92c4339038247cfd7443 (diff)
downloadlibguestfs-4891ff9945177e8666af8381d1e0a54b8ce363e2.tar.gz
libguestfs-4891ff9945177e8666af8381d1e0a54b8ce363e2.tar.xz
libguestfs-4891ff9945177e8666af8381d1e0a54b8ce363e2.zip
More complete fix for bash regexp quoting bug.
Commit 457fccae1b665347 was not a complete fix, in that it didn't work properly on RHEL 5 era bash (3.2.x). For example: file=libntfs-3g.so.74 [[ "$file" =~ ^lib(.*)\.so\.([0-9]+)\. ]] && \ echo "lib${BASH_REMATCH[1]}.so.${BASH_REMATCH[2]}.*" would on those old shells print: libntfs-3g.so.7.* It seems the final \. was being treated as a plain period (ie. match anything). The only way to work around this incompatibility is to assign the patterns to variables and match on those, ie: p='^lib(.*)\.so\.([0-9]+)\.' [[ "$file" =~ $p ]] && ... This works in both old and new shells.
Diffstat (limited to 'python/run-python-tests')
0 files changed, 0 insertions, 0 deletions