mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
build/ops: fix /etc/os-release parsing in install-deps.sh
85a370e35f
introduced the DISTRO variable whose
value was obtained by parsing /etc/os-release like this:
DISTRO=$(grep "^ID=" /etc/os-release | sed "s/ID=//")
This unfortunately picks up the double-quotes, so on a CentOS system DISTRO
will be equal to '"centos"'.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
This commit is contained in:
parent
187e4fcb1e
commit
fd37e87f6d
@ -55,8 +55,8 @@ if [ x`uname`x = xFreeBSDx ]; then
|
||||
|
||||
exit
|
||||
else
|
||||
DISTRO=$(grep "^ID=" /etc/os-release | sed "s/ID=//")
|
||||
case $DISTRO in
|
||||
source /etc/os-release
|
||||
case $ID in
|
||||
debian|ubuntu|devuan)
|
||||
echo "Using apt-get to install dependencies"
|
||||
$SUDO apt-get install -y lsb-release devscripts equivs
|
||||
@ -118,7 +118,7 @@ else
|
||||
$SUDO zypper --non-interactive install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1
|
||||
;;
|
||||
*)
|
||||
echo "$DISTRO is unknown, dependencies will have to be installed manually."
|
||||
echo "$ID is unknown, dependencies will have to be installed manually."
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user