diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt index 6644790..10d3232 100644 --- a/dotfiles-old/scripts/README.txt +++ b/dotfiles-old/scripts/README.txt @@ -14,23 +14,26 @@ mkdir -p $HOME/bin # executables mkdir -p $HOME/src # source code if [ $1 = "arch" ]; then - # this enables the multilib repo. may fuck shit up. - sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf + sudo bash arch_enable-multilib.sh - # because of this right here packages/all should have a trailing - # newline - sudo pacman -S $(cat packages/all packages/arch_pacman) + sudo pacman -S $(cat packages/all packages/*arch_pacman*) bash arch_yay.sh - yay -S $(cat packages/arch_yay) + yay -S $(cat packages/*arch_yay*) - # PKGBUILD to symlink sudo to doas - # sudo is provided by base-devel so this has to be done after the - # pacman stuff. however, it might be beneficial to do this before the - # yay stuff so it doesn't constantly prompt for the sudo password. - # all depends on how careful you wanna be. - bash arch_doas-sudo.sh - # btw, you can undo this with pacman -S sudo + bash doas-sudo.sh arch + # you can undo this with pacman -S sudo + +elif [ $1 = "artix" ]; then + sudo bash arch_enable-multilib.sh + + sudo pacman -S $(cat packages/all packages/*artix_pacman*) + + bash arch_yay.sh + yay -S $(cat packages/*artix_yay*) + + bash doas-sudo.sh arch + # you can undo this with pacman -S sudo elif [ $1 = "debian" ]; then diff --git a/dotfiles-old/scripts/arch_doas-sudo.sh b/dotfiles-old/scripts/arch_doas-sudo.sh deleted file mode 100644 index 70976be..0000000 --- a/dotfiles-old/scripts/arch_doas-sudo.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -e -source ./cdecho.sh - -mkdir -p $HOME/src/doas-sudo -cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD - -cde $HOME/src/doas-sudo -makepkg -si diff --git a/dotfiles-old/scripts/arch_enable-multilib.sh b/dotfiles-old/scripts/arch_enable-multilib.sh new file mode 100755 index 0000000..4dcb70a --- /dev/null +++ b/dotfiles-old/scripts/arch_enable-multilib.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# must be run as root + +if [ $1 = "artix" ]; then + printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist-arch\n' >>/etc/pacman.conf +else + printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf +fi diff --git a/dotfiles-old/scripts/arch_yay.sh b/dotfiles-old/scripts/arch_yay.sh old mode 100644 new mode 100755 index 30ee055..625fa2e --- a/dotfiles-old/scripts/arch_yay.sh +++ b/dotfiles-old/scripts/arch_yay.sh @@ -4,7 +4,7 @@ set -e source ./cdecho.sh cde $HOME/src -git clone https://aur.archlinux.org/yay.git +git clone https://aur.archlinux.org/yay.git || git pull cde yay makepkg -si yay -V diff --git a/dotfiles-old/scripts/doas-sudo.sh b/dotfiles-old/scripts/doas-sudo.sh new file mode 100755 index 0000000..83c9b60 --- /dev/null +++ b/dotfiles-old/scripts/doas-sudo.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +source ./cdecho.sh + +if [ $1 = "arch" ]; then + mkdir -p $HOME/src/doas-sudo + cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD + + cde $HOME/src/doas-sudo + makepkg -si +fi diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index 60233c7..e515928 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -36,6 +36,6 @@ printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 20 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive -printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv +printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x *