mirror of
https://github.com/gryf/vmstrap.git
synced 2025-12-18 12:00:31 +01:00
Fix for leading whitespaces in lsb_release output
This commit is contained in:
@@ -11,7 +11,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
if command -v lsb_release 2>&1 > /dev/null; then
|
if command -v lsb_release 2>&1 > /dev/null; then
|
||||||
DISTRO_ID=$(lsb_release -i | cut -f 2 -d ':' | tr '[:upper:]' '[:lower:]')
|
DISTRO_ID=$(lsb_release -i | cut -f 2 -d ':' | xargs \
|
||||||
|
| tr '[:upper:]' '[:lower:]')
|
||||||
DISTRO_R=$(lsb_release -r | awk '{print $2}')
|
DISTRO_R=$(lsb_release -r | awk '{print $2}')
|
||||||
else
|
else
|
||||||
if [[ -e /etc/redhat-release ]]; then
|
if [[ -e /etc/redhat-release ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user