In
3b433e39382b13dda5d25aebecaf4864ef69c8d4
"mg-adjust-flight-makexrefs: Use ^ for excluding jobs, not !"
a shell glob pattern was changed:
- !*) ifmatch=$tokeep; action=$todelete ; glob="${glob#!}" ;;
+ [!^]*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;
But in globbing, ! inside [ ] is a character class complement, not a
literal. The result is that mg-adjust-flight-makexrefs would
generally replace jobs willy-nilly.
Fix this by using two separate glob patterns, and no character class.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
for glob in $keepjobs; do
case "$glob" in
- [!^]*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;
+ ^*|!*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;
*) ifmatch=$todelete; action=$tokeep ;;
esac