Skip to content

Commit

Permalink
add setup_ppa.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
koide3 committed Jul 24, 2024
1 parent d0951df commit 106076e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions packages/glim
Submodule glim added at 3d65b3
1 change: 1 addition & 0 deletions packages/glim_ros2
Submodule glim_ros2 added at 71ff68
31 changes: 31 additions & 0 deletions setup_ppa.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 106076e

Please sign in to comment.