Merge pull request #10 from jroddev/escape-regex-control

g++ install is failing because + is treated as a regex control character
This commit is contained in:
Andrew Walsh 2022-02-14 09:45:56 -08:00 committed by GitHub
commit c7ec949338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,8 @@ echo "done."
echo -n "Verifying packages..." echo -n "Verifying packages..."
for package in $packages; do for package in $packages; do
apt-cache search ^$package$ | grep $package > /dev/null escaped=$(echo $package | sed 's/+/\\+/g')
apt-cache search ^$escaped$ | grep $package > /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "aborted." echo "aborted."
echo "Package '$package' not found." >&2 echo "Package '$package' not found." >&2