80 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| post_install() {
 | |
|     # Initiate the stow repo
 | |
|     >&2 echo "Cloning stow git repository"
 | |
|     git clone --depth 1 --progress https://git.depeuter.tk/tdpeuter/arch-pkgs /usr/share/tdpeuter/arch-pkgs
 | |
| 
 | |
|     # Installing yay
 | |
|     >&2 echo "Installing yay"
 | |
|     pacman -S --needed git base-devel
 | |
|     git clone https://aur.archlinux.org/yay.git
 | |
|     cd yay
 | |
|     su -c "makepkg -si --asdeps --noconfirm" - tdpeuter
 | |
|    
 | |
|     post_upgrade
 | |
| }
 | |
| 
 | |
| post_upgrade() {
 | |
|     install_apps
 | |
|     
 | |
|     code --install-extension ms-vscode.cpptools
 | |
|     
 | |
|     install_fonts
 | |
|     do_stow
 | |
| }
 | |
| 
 | |
| pre_remove() {
 | |
|     rm -rf /usr/share/tdpeuter/arch-pkgs
 | |
| }
 | |
| 
 | |
| install_apps() {
 | |
|     rm /var/lib/pacman/db.lck
 | |
| 
 | |
|     # Desktop
 | |
|     pkgs=" sway-git swaylock-effects-git "
 | |
| 
 | |
|     # Socials & entertainment
 | |
|     pkgs+=" betterbird-bin hamsket-bin jellyfin-media-player spotify "
 | |
|     pkgs+=" zoom "
 | |
| 
 | |
|     # Coding
 | |
|     pkgs+=" intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre "
 | |
|     pkgs+=" jetbrains-fleet pycharm-professional rstudio-desktop-bin "
 | |
|     pkgs+=" visual-studio-code-bin "
 | |
| 
 | |
|     # Tools
 | |
|     pkgs+=" google-chrome zenith "
 | |
| 
 | |
|     # Skip these
 | |
|     options="--sudoflags -A --answerclean None --answerdiff None "
 | |
|     # Do not wait
 | |
|     options+="--noconfirm "
 | |
| 
 | |
|     su -c "export SUDO_ASKPASS=/usr/lib/ssh/x11-ssh-askpass && yay ${options} -S ${pkgs}" - tdpeuter
 | |
| }
 | |
| 
 | |
| install_fonts() {
 | |
|     mkdir -p /usr/local/share/fonts/letter
 | |
| 
 | |
|     >&2 echo "Installing letter (font)"
 | |
|     git clone --depth 1 --progress https://github.com/tdpeuter/letter.git
 | |
|     cd letter
 | |
|     cp ttf/* /usr/local/share/fonts/letter/
 | |
|     cp ttf-unhinted/* /usr/local/share/fonts/letter/
 | |
|     cp woff2/* /usr/local/share/fonts/letter/
 | |
|     cd
 | |
| }
 | |
| 
 | |
| do_stow() {
 | |
|     >&2 echo "Moving to dotfile directory"
 | |
|     cd /usr/share/tdpeuter/arch-pkgs/ 
 | |
| 
 | |
|     >&2 echo "Pulling stow git repository"
 | |
|     git pull
 | |
| 
 | |
|     user=$(who | cut -f1 -d' ')
 | |
|     packages=$(ls ./stow)
 | |
|     
 | |
|     >&2 echo "Stowing all packages"
 | |
|     stow -d ./stow -t "/home/${user}" ${packages}
 | |
| }
 | |
| 
 |