diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2010-03-14 23:11:39 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2010-03-14 23:11:39 -0500 |
commit | 2ec6109275a7ff6b3aa859c9981299e85ff68173 (patch) | |
tree | 27fe6c5beac4116b317ffcec303966db22949edc | |
parent | ff649497ad05fc7a7e7a2d33f7e91174f61da5ac (diff) |
Fix import-fdi-quirkdb
Magic foo_outof regex munging code was not working due to a deplorable lack of extglob.
-rw-r--r-- | src/import-fdi-quirkdb.in | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/import-fdi-quirkdb.in b/src/import-fdi-quirkdb.in index f344304..263c3be 100644 --- a/src/import-fdi-quirkdb.in +++ b/src/import-fdi-quirkdb.in @@ -19,6 +19,7 @@ # into the native ones at $2. . "@PM-UTILS-LIBDIR@/pm-functions" +shopt -s extglob begin_match='<match key="([a-z._]+)" ([a-z_]+)="([^"]+)">' end_match='</match>' @@ -72,12 +73,12 @@ escape_match() { case $1 in string) lit="^${lit}\$" ;; int|uint64) fun=numeric_compare_eq ;; - string_outof) lit="${lit%;}"; lit="^(${lit//@(*( );*( ))/|})\$" ;; + string_outof) lit="${lit%;}"; lit="^(${lit/(*( );*( )/|})\$" ;; int_outof) fun=numeric_compare_eq_list ;; contains) ;; - contains_outof) lit="${lit%;}"; lit="${lit//@(*( );*( ))/|}" ;; + contains_outof) lit="${lit%;}"; lit="${lit//*( );*( )/|}" ;; prefix) lit="^${lit}" ;; - prefix_outof) lit="${lit%;}"; lit="^(${lit//@(*( );*( ))/|})" ;; + prefix_outof) lit="${lit%;}"; lit="^(${lit//*( );*( )/|})" ;; suffix) lit="${lit}\$" ;; contains_ncase) fun=regex_ncase ;; contains_not) fun=regex_inverse ;; |