Compare commits
3 commits
3713396153
...
ccc68c5612
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ccc68c5612 | ||
![]() |
28c4733505 | ||
![]() |
b00ff7426b |
3 changed files with 54 additions and 72 deletions
70
docker.sh
70
docker.sh
|
@ -39,7 +39,7 @@ getImports() {
|
|||
}
|
||||
|
||||
init_docker() {
|
||||
if command -v docker >/dev/null 2>&1; then
|
||||
if command_exists docker; then
|
||||
echo_info "Docker was installed correctly. Do you want to add $(whoami) to the docker group? (y/n)"
|
||||
read -r dgroup </dev/tty
|
||||
case "$dgroup" in
|
||||
|
@ -48,7 +48,7 @@ init_docker() {
|
|||
;;
|
||||
esac
|
||||
sleep 1
|
||||
$_sudo systemctl enable --now docker
|
||||
run $_sudo systemctl enable --now docker
|
||||
echo_info "$(whoami) is now part of the docker group. Restart your session to enable the changes. Also docker was addet as a service. Should autostart from now on."
|
||||
else
|
||||
echo_error "Something went wrong!"
|
||||
|
@ -57,19 +57,19 @@ init_docker() {
|
|||
|
||||
_arch() {
|
||||
echo_info "executing arch"
|
||||
sleep 2
|
||||
_install docker docker-compose --noconfirm
|
||||
sleep 1.3
|
||||
run _install docker docker-compose --noconfirm
|
||||
}
|
||||
|
||||
_debian() {
|
||||
if ! $trixie; then
|
||||
echo_info "executing debian"
|
||||
sleep 2
|
||||
$_sudo apt-get update &&
|
||||
$_sudo apt-get install -y ca-certificates curl &&
|
||||
$_sudo install -m 0755 -d /etc/apt/keyrings &&
|
||||
$_sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc &&
|
||||
$_sudo chmod a+r /etc/apt/keyrings/docker.asc &&
|
||||
sleep 1.3
|
||||
run $_sudo apt-get update &&
|
||||
run $_sudo apt-get install -y ca-certificates curl &&
|
||||
run $_sudo install -m 0755 -d /etc/apt/keyrings &&
|
||||
run $_sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc &&
|
||||
run $_sudo chmod a+r /etc/apt/keyrings/docker.asc &&
|
||||
sleep 0.5
|
||||
if [ "$VERSION_CODENAME" == "trixie" ]; then
|
||||
VERSION_CODENAME="bookworm"
|
||||
|
@ -79,37 +79,37 @@ _debian() {
|
|||
|
||||
echo_info "Addet repository. Updating and installing now.."
|
||||
sleep 1
|
||||
$_sudo apt-get update
|
||||
checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
|
||||
run $_sudo apt-get update
|
||||
run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
|
||||
else
|
||||
echo_info "executing trixie.."
|
||||
_install docker.io docker-compose
|
||||
run _install docker.io docker-compose
|
||||
fi
|
||||
}
|
||||
|
||||
_ubuntu() {
|
||||
echo_info "executing ubuntu"
|
||||
sleep 2
|
||||
$_sudo apt-get update &&
|
||||
$_sudo apt-get install -y ca-certificates curl &&
|
||||
$_sudo install -m 0755 -d /etc/apt/keyrings &&
|
||||
$_sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc &&
|
||||
$_sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
run $_sudo apt-get update &&
|
||||
run $_sudo apt-get install -y ca-certificates curl &&
|
||||
run $_sudo install -m 0755 -d /etc/apt/keyrings &&
|
||||
run $_sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc &&
|
||||
run $_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/ubuntu \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | $_sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||
|
||||
echo_info "Addet repository. Updating and installing now.."
|
||||
sleep 0.5
|
||||
$_sudo apt-get update
|
||||
checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
|
||||
run $_sudo apt-get update
|
||||
run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
|
||||
}
|
||||
|
||||
_fedora() {
|
||||
echo_info "executing fedora"
|
||||
sleep 2
|
||||
_install dnf-plugins-core
|
||||
$_sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||
checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
|
||||
run _install dnf-plugins-core
|
||||
run $_sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||
run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
|
||||
}
|
||||
|
||||
main() {
|
||||
|
@ -125,25 +125,15 @@ main() {
|
|||
if getImports; then
|
||||
case "$1" in
|
||||
--silent | -s)
|
||||
echo_warning "Executing silently!"
|
||||
echo_info "Executing $distro"
|
||||
case "$distro" in
|
||||
arch) silentexec _arch ;;
|
||||
debian) silentexec _debian ;;
|
||||
ubuntu) silentexec _ubuntu ;;
|
||||
fedora) silentexec _fedora ;;
|
||||
*)
|
||||
echo "$distro is not supported by this script"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
init_docker
|
||||
silent=true
|
||||
echo_warning "Running the script silently.."
|
||||
;;
|
||||
*)
|
||||
if main; then
|
||||
init_docker
|
||||
fi
|
||||
silent=false
|
||||
;;
|
||||
esac
|
||||
|
||||
if main; then
|
||||
init_docker
|
||||
fi
|
||||
fi
|
||||
|
|
55
hyprland.sh
55
hyprland.sh
|
@ -36,14 +36,6 @@ getImports() {
|
|||
rm "$import"
|
||||
}
|
||||
|
||||
run(){
|
||||
if $silent; then
|
||||
silentexec "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
askThings() {
|
||||
echo_note "Do you want to install hyprland? (y/N)"
|
||||
read -r askHyprland </dev/tty
|
||||
|
@ -100,17 +92,16 @@ instCustom() {
|
|||
waybar) checkAndInstall waybar ;;
|
||||
hyprpanel)
|
||||
case $distro in
|
||||
arch) _install ags-hyprpanel-git ;;
|
||||
arch) run _install ags-hyprpanel-git ;;
|
||||
*) echo_error "Hyprpanel cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
|
||||
esac
|
||||
;;
|
||||
gBar)
|
||||
case $distro in
|
||||
arch) _install gbar-git ;;
|
||||
arch) run _install gbar-git ;;
|
||||
*) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
|
||||
esac
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -120,12 +111,12 @@ cloneDotfiles() {
|
|||
case "$askDotfiles2" in
|
||||
[pP])
|
||||
echo_info "Cloning pika's config..."
|
||||
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git $HOME/git/hyprdots || echo_error "Failed to clone dotfiles!" && exit 1
|
||||
run git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git "$HOME/git/hyprdots" || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
||||
|
||||
cd $HOME/git/hyprdots || echo_error "Failed to clone dotfiles!" && exit 1
|
||||
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
||||
|
||||
echo_info "Installing dotfiles..."
|
||||
make </dev/tty || echo_error "Failed to install dotfiles!" && exit 1
|
||||
make </dev/tty || { echo_error "Failed to install dotfiles!" && exit 1; }
|
||||
|
||||
echo_info "Dotfiles installed successfully!"
|
||||
;;
|
||||
|
@ -133,7 +124,7 @@ cloneDotfiles() {
|
|||
echo_info "Cloning dotfiles from $askDotfiles2..."
|
||||
git clone --recursive --depth=1 $askDotfiles2 $HOME/git/hyprdots
|
||||
|
||||
cd $HOME/git/hyprdots || echo_error "Failed to clone dotfiles!" && exit 1
|
||||
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
|
||||
|
||||
echo_info "Your dotfiles have been saved to $HOME/git/hyprdots"
|
||||
echo_info "You can now install your dotfiles how you want to!"
|
||||
|
@ -163,23 +154,23 @@ checkConfig() {
|
|||
|
||||
main() {
|
||||
case "$distro" in
|
||||
arch)
|
||||
local deps=(
|
||||
hyprland
|
||||
hypridle
|
||||
hyprpolkitagent
|
||||
hyprland-protocols
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
wl-clipboard
|
||||
xdg-desktop-portal-hyprland
|
||||
)
|
||||
checkAndInstall "${deps[@]}"
|
||||
;;
|
||||
*)
|
||||
echo "$distro is not supported by this script!"
|
||||
exit 1
|
||||
;;
|
||||
arch)
|
||||
local deps=(
|
||||
hyprland
|
||||
hypridle
|
||||
hyprpolkitagent
|
||||
hyprland-protocols
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
wl-clipboard
|
||||
xdg-desktop-portal-hyprland
|
||||
)
|
||||
checkAndInstall "${deps[@]}"
|
||||
;;
|
||||
*)
|
||||
echo "$distro is not supported by this script!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
1
pkgui.sh
1
pkgui.sh
|
@ -116,6 +116,7 @@
|
|||
case "$1" in
|
||||
--silent | -s)
|
||||
silent=true
|
||||
echo_warning "Running the script silently.."
|
||||
;;
|
||||
*)
|
||||
silent=false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue