mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2024-12-22 10:45:29 +00:00
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:
commit
c7ec949338
|
@ -28,7 +28,8 @@ echo "done."
|
|||
|
||||
echo -n "Verifying packages..."
|
||||
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
|
||||
echo "aborted."
|
||||
echo "Package '$package' not found." >&2
|
||||
|
|
Loading…
Reference in a new issue