mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Fix SC2086 - Double quote to prevent globing and word splitting
This commit is contained in:
parent
a9b6185fac
commit
b8bb0aa0cc
1 changed files with 4 additions and 4 deletions
|
@ -578,14 +578,14 @@ __gather_os_info
|
|||
__parse_version_string() {
|
||||
VERSION_STRING="$1"
|
||||
PARSED_VERSION=$(
|
||||
echo $VERSION_STRING |
|
||||
echo "$VERSION_STRING" |
|
||||
sed -e 's/^/#/' \
|
||||
-e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\)\(\.[0-9][0-9]*\).*$/\1/' \
|
||||
-e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \
|
||||
-e 's/^#[^0-9]*\([0-9][0-9]*\).*$/\1/' \
|
||||
-e 's/^#.*$//'
|
||||
)
|
||||
echo $PARSED_VERSION
|
||||
echo "$PARSED_VERSION"
|
||||
}
|
||||
|
||||
|
||||
|
@ -917,10 +917,10 @@ __ubuntu_derivatives_translation() {
|
|||
if [ "x${match}" != "x" ]; then
|
||||
case $match in
|
||||
"elementary_os")
|
||||
_major="$(echo $DISTRO_VERSION | sed 's/\.//g')"
|
||||
_major=$(echo "$DISTRO_VERSION" | sed 's/\.//g')
|
||||
;;
|
||||
*)
|
||||
_major="$(echo $DISTRO_VERSION | sed 's/^\([0-9]*\).*/\1/g')"
|
||||
_major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue