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:
parent
74b2549c68
commit
b063f1a071
11 changed files with 27 additions and 2 deletions
BIN
etc/apt/keyrings/docker-archive-keyring.gpg
Normal file
BIN
etc/apt/keyrings/docker-archive-keyring.gpg
Normal file
Binary file not shown.
BIN
etc/apt/keyrings/microsoft-archive-keyring.gpg
Normal file
BIN
etc/apt/keyrings/microsoft-archive-keyring.gpg
Normal file
Binary file not shown.
BIN
etc/apt/keyrings/slack-archive-keyring.gpg
Normal file
BIN
etc/apt/keyrings/slack-archive-keyring.gpg
Normal file
Binary file not shown.
BIN
etc/apt/keyrings/tailscale-archive-keyring.gpg
Normal file
BIN
etc/apt/keyrings/tailscale-archive-keyring.gpg
Normal file
Binary file not shown.
1
etc/apt/sources.list.d/code.list
Normal file
1
etc/apt/sources.list.d/code.list
Normal file
|
@ -0,0 +1 @@
|
|||
deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] http://packages.microsoft.com/repos/code stable main
|
1
etc/apt/sources.list.d/docker-ce.list
Normal file
1
etc/apt/sources.list.d/docker-ce.list
Normal file
|
@ -0,0 +1 @@
|
|||
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable
|
1
etc/apt/sources.list.d/docker-compose-plugin.list
Normal file
1
etc/apt/sources.list.d/docker-compose-plugin.list
Normal file
|
@ -0,0 +1 @@
|
|||
# docker-ce.list
|
1
etc/apt/sources.list.d/microsoft-edge-stable.list
Normal file
1
etc/apt/sources.list.d/microsoft-edge-stable.list
Normal file
|
@ -0,0 +1 @@
|
|||
deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/edge stable main
|
1
etc/apt/sources.list.d/slack-desktop.list
Normal file
1
etc/apt/sources.list.d/slack-desktop.list
Normal file
|
@ -0,0 +1 @@
|
|||
deb [signed-by=/usr/share/keyrings/slack-archive-keyring.gpg] https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
|
1
etc/apt/sources.list.d/tailscale.list
Normal file
1
etc/apt/sources.list.d/tailscale.list
Normal file
|
@ -0,0 +1 @@
|
|||
deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu jammy main
|
23
install
23
install
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue