openrepo icon indicating copy to clipboard operation
openrepo copied to clipboard

[Suggestion] Update Repo Instructions to make them more 'copy&paste-able'

Open populationless opened this issue 2 years ago • 1 comments

Hi Matt, it's me again 😅

I have a small suggestion, like the title says. Currently the Repo Instructions look like this:

apt update && apt install -y curl gnupg
curl https://mydomain.com/repo/public.gpg | gpg --yes --dearmor -o /usr/share/keyrings/openrepo-repo.gpg
echo "deb [arch=any signed-by=/usr/share/keyrings/openrepo-repo.gpg] https://mydomain.com/repo/ stable main" > /etc/apt/sources.list.d/openrepo-repo.list
apt update

I would modify them to add sudo in some choice places, so that the commands can be copy-pasted into a non-root terminal, like so:

sudo apt update && sudo apt install -y curl gnupg
curl https://mydomain.com/repo/public.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/openrepo-repo.gpg
echo "deb [arch=any signed-by=/usr/share/keyrings/openrepo-repo.gpg] https://mydomain.com/repo/ stable main" | sudo tee /etc/apt/sources.list.d/openrepo-repo.list
sudo apt update

Since redirecting echo into privileged files doesn't work in a non-root terminal, I pipe to sudo tee instead. For similar reasons I added sudo to the gpg command on line 2. apt should be self-explanatory.

Please let me know what you think and thanks for an awesome project. Already getting some nice use out of it 😊

populationless avatar Dec 22 '22 17:12 populationless