mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
'+' can also appear in a package file name.
Reported by: jhb '^' could also appear in a package file name.
This commit is contained in:
parent
190b2c4f8a
commit
7e92d04c01
1 changed files with 6 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#! /bin/sh
|
||||
# ex:ts=8
|
||||
|
||||
# Copyright (c) 2003 David E. O'Brien
|
||||
# All rights reserved.
|
||||
|
|
@ -40,7 +41,11 @@ case $# in
|
|||
esac
|
||||
|
||||
PKG_LIST=$(basename `ls $3/*.${PKG_EXT}` | sed -e "s/\.${PKG_EXT}$//")
|
||||
REGEX=$(echo ${PKG_LIST} | sed -e 's/ /|/g' -e 's/\./\\\./g')
|
||||
REGEX=$(echo ${PKG_LIST} | sed \
|
||||
-e 's/ /|/g' \
|
||||
-e 's/\./\\\./g' \
|
||||
-e 's/\+/\\\+/g' \
|
||||
-e 's/\^/\\\^/g')
|
||||
|
||||
egrep "^(${REGEX})" $1 > $2
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue