Adjust "docker-php-ext-enable" to use "grep -Fx"

Also, test both versions (with `.so` and without).

This helps avoid false positives due to lines like `extension=apc` matching `extension=apcu`.
This commit is contained in:
Tianon Gravi 2021-01-20 10:43:48 -08:00
parent c70a901d7f
commit 74175669f4
33 changed files with 33 additions and 33 deletions

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done

View File

@ -111,7 +111,7 @@ for module in $modules; do
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done