From c808e5f23c4d51b0e56af3e5bcef229799c97b76 Mon Sep 17 00:00:00 2001 From: Thomas Vegas Date: Fri, 29 Nov 2024 12:02:18 +0200 Subject: [PATCH] CONTRIB: Address review comments --- contrib/api_update.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/contrib/api_update.sh b/contrib/api_update.sh index 2e1223dddbc..bd93b1e7dbb 100755 --- a/contrib/api_update.sh +++ b/contrib/api_update.sh @@ -10,17 +10,23 @@ branch="${1?Specify remote version to use like "upstream/v1.18.x"}" remote="${branch%%/*}" version="$(echo "${branch##*/}" | sed -e 's@\(v[0-9]\+\.[0-9]\+\).*@\1@')" -if ! git rev-parse --verify --quiet "$branch" >/dev/null; then +if ! git rev-parse --verify --quiet "$branch" >/dev/null +then echo "Branch \"$branch\" does not exist" exit 1 fi echo "Proceed with clean checkout of $branch (${version})?" -read -r +read -r -p "press " set -x -sudo yum -y install doxygen doxygen-latex +if grep -qi "debian\|ubuntu" /etc/os-release 2>/dev/null +then + sudo apt-get -y install doxygen doxygen-latex +else + sudo yum -y install doxygen doxygen-latex +fi git checkout "$branch" git clean -xdf