1
0
Fork 0
mirror of https://github.com/kou029w/dotfiles.git synced 2025-01-18 16:07:59 +00:00

install apt packages

This commit is contained in:
Nebel 2022-04-25 20:36:15 +09:00
parent 74b2549c68
commit b063f1a071
11 changed files with 27 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] http://packages.microsoft.com/repos/code stable main

View file

@ -0,0 +1 @@
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable

View file

@ -0,0 +1 @@
# docker-ce.list

View file

@ -0,0 +1 @@
deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/edge stable main

View file

@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/slack-archive-keyring.gpg] https://packagecloud.io/slacktechnologies/slack/debian/ jessie main

View file

@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu jammy main

23
install
View file

@ -2,7 +2,7 @@
set -euo pipefail
cd -- "$(dirname -- "$0")"
function main() {
function install_dotfiles() {
local home
local dotfile
home=$(eval echo ~"${SUDO_USER:-$(id -un)}")
@ -17,4 +17,23 @@ function main() {
done
}
main
function install_apt_packages() {
local packages
local package
packages=()
for package in etc/apt/sources.list.d/*.list; do
package=${package##*/}
package=${package%.list}
packages+=("$package")
done
rsync -rv etc/apt/keyrings/ /usr/share/keyrings/
rsync -rv etc/apt/sources.list.d/ /etc/apt/sources.list.d/
apt update
apt install -y "${packages[@]}"
}
install_dotfiles
(($(id -u) == 0)) \
&& [[ -d /etc/apt/sources.list.d ]] \
&& install_apt_packages