From 106076e1074bdd1d2dce84c8785bd63fabf59b53 Mon Sep 17 00:00:00 2001 From: "k.koide" Date: Wed, 24 Jul 2024 18:48:48 +0900 Subject: [PATCH] add setup_ppa.sh --- .gitmodules | 6 ++++++ packages/glim | 1 + packages/glim_ros2 | 1 + setup_ppa.sh | 31 +++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 160000 packages/glim create mode 160000 packages/glim_ros2 create mode 100755 setup_ppa.sh diff --git a/.gitmodules b/.gitmodules index 624743d..ac372f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,9 @@ [submodule "packages/gtsam_points"] path = packages/gtsam_points url = git@github.com:koide3/gtsam_points +[submodule "packages/glim"] + path = packages/glim + url = git@github.com:koide3/glim +[submodule "packages/glim_ros2"] + path = packages/glim_ros2 + url = git@github.com:koide3/glim_ros2 diff --git a/packages/glim b/packages/glim new file mode 160000 index 0000000..3d65b3b --- /dev/null +++ b/packages/glim @@ -0,0 +1 @@ +Subproject commit 3d65b3b72a730b6b41fc667ed639bae5c29ca78a diff --git a/packages/glim_ros2 b/packages/glim_ros2 new file mode 160000 index 0000000..71ff684 --- /dev/null +++ b/packages/glim_ros2 @@ -0,0 +1 @@ +Subproject commit 71ff684da5a7694015d94d3017750c567f27d51f diff --git a/setup_ppa.sh b/setup_ppa.sh new file mode 100755 index 0000000..be758db --- /dev/null +++ b/setup_ppa.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# exit if not root +if [ "$EUID" -ne 0 ]; then + echo "Must be run with sudo" + exit 1 +fi + +apt-get update && apt-get install -y curl gpg + +. /etc/os-release +release="${UBUNTU_CODENAME}" +echo release=$release + +if [ $release == "noble" ]; then + ubuntu_label="ubuntu2404" +elif [ $release == "jammy" ]; then + ubuntu_label="ubuntu2204" +elif [ $release == "focal" ]; then + ubuntu_label="ubuntu2004" +else + echo "Unsupported release: $release" + exit 1 +fi + +echo "ubuntu_label=$ubuntu_label" +echo curl -s --compressed "https://koide3.github.io/ppa/$ubuntu_label/KEY.gpg" | gpg --dearmor | tee /etc/apt/trusted.gpg.d/koide3_ppa.gpg >/dev/null +echo echo "deb [signed-by=/etc/apt/trusted.gpg.d/koide3_ppa.gpg] https://koide3.github.io/ppa/$ubuntu_label ./" | tee /etc/apt/sources.list.d/koide3_ppa.list + +curl -s --compressed "https://koide3.github.io/ppa/$ubuntu_label/KEY.gpg" | gpg --dearmor | tee /etc/apt/trusted.gpg.d/koide3_ppa.gpg >/dev/null +echo "deb [signed-by=/etc/apt/trusted.gpg.d/koide3_ppa.gpg] https://koide3.github.io/ppa/$ubuntu_label ./" | tee /etc/apt/sources.list.d/koide3_ppa.list