Just use just
This commit is contained in:
parent
8bb33a701a
commit
72f63fe8c9
44
justfile
44
justfile
@ -8,7 +8,7 @@ id_like := `grep -G "\bID_LIKE\b" /etc/os-release | awk -F= '{print $2}'`
|
|||||||
release := `grep "VERSION_CODENAME" /etc/os-release | awk -F= '{print $2}'`
|
release := `grep "VERSION_CODENAME" /etc/os-release | awk -F= '{print $2}'`
|
||||||
run_user := env_var("USER")
|
run_user := env_var("USER")
|
||||||
|
|
||||||
caddy:
|
install-caddy:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ "$distro" == "debian" ]; then
|
if [ "$distro" == "debian" ]; then
|
||||||
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
||||||
@ -24,7 +24,7 @@ caddy:
|
|||||||
sudo pkg install -y caddy
|
sudo pkg install -y caddy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
thelounge:
|
install-thelounge:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ "$distro" == "debian" ]; then
|
if [ "$distro" == "debian" ]; then
|
||||||
curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
|
curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
|
||||||
@ -34,34 +34,10 @@ thelounge:
|
|||||||
echo "This justfile only supports The Lounge on Debian systems."
|
echo "This justfile only supports The Lounge on Debian systems."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tailscale:
|
install-tailscale:
|
||||||
curl -fsSL https://tailscale.com/install.sh | sh
|
curl -fsSL https://tailscale.com/install.sh | sh
|
||||||
sudo tailscale up
|
sudo tailscale up
|
||||||
|
|
||||||
scihub:
|
|
||||||
mkdir ~/scihub-torrent-urls
|
|
||||||
lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ | grep "\.torrent" | tee ~/scihub-torrent-urls/urls.txt
|
|
||||||
cd ~/scihub-torrent-urls && split -l 60 ~/scihub-torrent-urls/urls.txt torrent-
|
|
||||||
rm -fv ~/scihub-torrent-urls/urls.txt
|
|
||||||
|
|
||||||
docker:
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
if [ "$distro" == "debian" ]; then
|
|
||||||
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt remove $pkg; done
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y ca-certificates curl
|
|
||||||
sudo install -m 0755 -d /etc/apt/keyrings
|
|
||||||
sudo curl -fsSL https://download.docker.com/linux/{{distro}}/gpg -o /etc/apt/keyrings/docker.asc
|
|
||||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/{{distro}} {{release}} stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose docker-compose-plugin
|
|
||||||
sudo systemctl enable --now docker.service
|
|
||||||
sudo usermod -aG docker {{run_user}}
|
|
||||||
else
|
|
||||||
echo "This justfile only supports Docker on Debian systems."
|
|
||||||
fi
|
|
||||||
|
|
||||||
rustup:
|
rustup:
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
|
||||||
@ -100,3 +76,17 @@ install-fzf:
|
|||||||
sudo mv fzf /usr/bin/fzf
|
sudo mv fzf /usr/bin/fzf
|
||||||
fi
|
fi
|
||||||
rm -v fzf*.txt fzf*.tar.gz
|
rm -v fzf*.txt fzf*.tar.gz
|
||||||
|
|
||||||
|
auto-podman-compose:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
containers=(AnonymousOverflow docker-breezewiki-quay dumb elk freshrss gothub libremdb lingva-translate privatebin redlib searxng shaarli)
|
||||||
|
COMPOSE_DIR="${HOME}/podman"
|
||||||
|
for ctn in "${containers[@]}"; do
|
||||||
|
cd "${COMPOSE_DIR}/${ctn}"
|
||||||
|
podman-compose down
|
||||||
|
podman-compose pull
|
||||||
|
podman-compose up -d
|
||||||
|
done
|
||||||
|
|
||||||
|
cd "${COMPOSE_DIR}/shaarli"
|
||||||
|
podman cp material shaarli_shaarli_1:/var/www/shaarli/tpl
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
containers=(
|
|
||||||
AnonymousOverflow
|
|
||||||
docker-breezewiki-quay
|
|
||||||
dumb
|
|
||||||
elk
|
|
||||||
freshrss
|
|
||||||
gothub
|
|
||||||
libremdb
|
|
||||||
lingva-translate
|
|
||||||
privatebin
|
|
||||||
qbittorrent-docker
|
|
||||||
redlib
|
|
||||||
searxng
|
|
||||||
shaarli
|
|
||||||
)
|
|
||||||
|
|
||||||
COMPOSE_DIR="${HOME}/podman"
|
|
||||||
|
|
||||||
for ctn in "${containers[@]}"; do
|
|
||||||
cd "${COMPOSE_DIR}/${ctn}"
|
|
||||||
podman-compose down
|
|
||||||
podman-compose pull
|
|
||||||
podman-compose up -d
|
|
||||||
done
|
|
Loading…
x
Reference in New Issue
Block a user