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