From 268a0cb8b6a30fbc6b4e6a4a55df9e3010221206 Mon Sep 17 00:00:00 2001 From: Arun-Prasad-V Date: Tue, 9 Jul 2024 15:07:57 +0530 Subject: [PATCH] Display NVIDIA license before syncing source --- scripts/patch-realsense-ubuntu-L4T.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/patch-realsense-ubuntu-L4T.sh b/scripts/patch-realsense-ubuntu-L4T.sh index 5523e97c6e1..6e870ff9d8d 100755 --- a/scripts/patch-realsense-ubuntu-L4T.sh +++ b/scripts/patch-realsense-ubuntu-L4T.sh @@ -11,6 +11,25 @@ exec 2> /dev/null con_dev=$(ls /dev/video* | wc -l) exec 2>&3 +function DisplayNvidiaLicense { + + # verify that curl is installed + if ! which curl > /dev/null ; then + echo "curl is not installed." + echo "curl can be installed by 'sudo apt-get install curl'." + exit 1 + fi + + echo -e "\nPlease notice: This script will download the kernel source (from nv-tegra, NVIDIA's public git repository) which is subject to the following license:\n\nhttps://developer.download.nvidia.com/embedded/L4T/r36_Release_v3.0/release/Tegra_Software_License_Agreement-Tegra-Linux.txt\n" + + license="$(curl -L -s https://developer.download.nvidia.com/embedded/L4T/r36_Release_v3.0/release/Tegra_Software_License_Agreement-Tegra-Linux.txt)\n\n" + + ## display the page ## + echo -e "${license}" + + read -t 30 -n 1 -s -r -e -p 'Press any key to continue (or wait 30 seconds..)' +} + if [ $con_dev -ne 0 ]; then echo -e "\e[32m" @@ -111,6 +130,10 @@ if [ "6.0" = "$PATCHES_REV" ]; then TEGRA_TAG="jetson_36.3" fi cp ./scripts/Tegra/$TEGRA_SOURCE_SYNC_SH ${sdk_dir}/Tegra + +# Display NVIDIA license +DisplayNvidiaLicense "" + #Download NVIDIA source, disregard errors on module tag sync ./Tegra/$TEGRA_SOURCE_SYNC_SH -k ${TEGRA_TAG} || true if [ "6.0" = "$PATCHES_REV" ]; then