From 42a3c63143cd520e93774c2ae03197f5fb4537bd Mon Sep 17 00:00:00 2001 From: Woen-Sug Choi Date: Mon, 17 Jun 2024 14:18:31 +0900 Subject: [PATCH] surprise. api.github.com has rate limit --- gz_install.sh | 10 +++++----- install.sh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gz_install.sh b/gz_install.sh index 82c7d6d..1048cab 100755 --- a/gz_install.sh +++ b/gz_install.sh @@ -57,11 +57,11 @@ GZ_INSTALL_ROOT=${GZ_INSTALL_ROOT:-$GZ_INSTALL_ROOT_DEFAULT} VIRTUAL_ENV_ROOT=${VIRTUAL_ENV_ROOT:-$VIRTUAL_ENV_ROOT_DEFAULT} # Get Current Version hash -LATEST_COMMIT_HASH=$(curl -s "https://api.github.com/repos/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/commits/main" | \ - grep '"sha":' | \ - head -n 1 | \ - awk -F '"' '{print $4}' | \ - cut -c1-7) +LATEST_COMMIT_HASH=$(curl -s "https://github.com/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/commits/main" | \ + grep -o 'commit/[0-9a-f]*' | \ + head -n 1 | \ + cut -d'/' -f2 | \ + cut -c1-7) # ------------------------------------------------------------------------------ # Initiation diff --git a/install.sh b/install.sh index 50ec39f..33aaf8a 100755 --- a/install.sh +++ b/install.sh @@ -71,11 +71,11 @@ ROS_INSTALL_ROOT=${ROS_INSTALL_ROOT:-$ROS_INSTALL_ROOT_DEFAULT} VIRTUAL_ENV_ROOT=${VIRTUAL_ENV_ROOT:-$VIRTUAL_ENV_ROOT_DEFAULT} # Get Current Version hash -LATEST_COMMIT_HASH=$(curl -s "https://api.github.com/repos/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/commits/main" | \ - grep '"sha":' | \ - head -n 1 | \ - awk -F '"' '{print $4}' | \ - cut -c1-7) +LATEST_COMMIT_HASH=$(curl -s "https://github.com/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/commits/main" | \ + grep -o 'commit/[0-9a-f]*' | \ + head -n 1 | \ + cut -d'/' -f2 | \ + cut -c1-7) # ------------------------------------------------------------------------------ # Initiation