configs/arch-config/scripts/arcolinux-config.sh

125 lines
3.7 KiB
Bash
Raw Normal View History

2020-03-12 11:44:07 +01:00
#!/bin/bash
2020-10-12 07:15:20 +02:00
set -euo pipefail
2020-04-10 13:12:35 +02:00
#ANY CHANGES TO THE INSTALLATION PROCEDURE SHOULD BE MADE HERE
2020-03-12 11:44:07 +01:00
#change to home (does not show in terminal)
2020-10-12 07:18:24 +02:00
cd "$HOME"
2020-03-12 11:44:07 +01:00
#remove old installs
2020-04-18 23:36:24 +02:00
rm -rf ~/config
2020-03-12 11:44:07 +01:00
#clone this repo
2020-04-18 23:36:24 +02:00
git clone https://gitlab.com/RealStickman-arcolinux/config.git &&
2020-03-12 11:44:07 +01:00
#delete previous backups
rm -rf ~/old_dat
2020-09-09 20:56:53 +02:00
2020-05-16 12:05:47 +02:00
#make new directory
mkdir ~/old_dat
2020-09-09 20:56:53 +02:00
#back stuff up
#config folders
rsync -ah ~/.config/MangoHud ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/autostart ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/fish ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/gtk-3.0 ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/i3 ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/neofetch ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/openbox ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/polybar ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/termite ~/old_dat/.config/ || echo Directory does not exist > /dev/null
rsync -ah ~/.config/variety ~/old_dat/.config/ || echo Directory does not exist > /dev/null
2020-11-09 19:52:31 +01:00
rsync -ah ~/.local/share/applications/ ~/old_dat/.local/share/ || echo Directory does not exist > /dev/null
#other directories
rsync -ah ~/scripts ~/old_dat/ || echo Directory does not exist > /dev/null
rsync -ah ~/.mozilla ~/old_dat/ || echo Directory does not exist > /dev/null
rsync -ah ~/.easystroke ~/old_dat/ || echo Directory does not exist > /dev/null
#rsync -ah ~/.emacs.d ~/old_dat/ || echo Directory does not exist > /dev/null
rsync -ah ~/.doom.d ~/old_dat/ || echo Directory does not exist > /dev/null
2020-05-18 08:09:49 +02:00
echo Made backups
2020-05-18 08:09:49 +02:00
#copy folders
2020-07-30 12:58:38 +02:00
cp -r ~/config/.config/ ~/ &&
2020-11-09 19:52:31 +01:00
cp -r ~/config/.local/ ~/ &&
2020-07-30 12:58:38 +02:00
cp -r ~/config/Dokumente ~/ &&
cp -r ~/config/.mozilla ~/ &&
cp -r ~/config/.easystroke ~/ &&
2020-09-09 20:56:53 +02:00
cp -r ~/config/.doom.d ~/ &&
2020-05-18 08:09:49 +02:00
echo Copied folders
2020-07-30 11:46:34 +02:00
2020-09-09 20:56:53 +02:00
#copy single files
2020-07-30 12:58:38 +02:00
cp -r ~/config/.bashrc ~/ &&
cp -r ~/config/.face ~/ &&
cp -r ~/config/.gtkrc-2.0 ~/ &&
2020-08-28 21:51:25 +02:00
cp -r ~/config/.gitconfig ~/ &&
2020-05-18 08:09:49 +02:00
echo Copied files
2020-07-30 11:46:34 +02:00
2020-09-09 20:56:53 +02:00
#copy scripts
2020-07-30 12:58:38 +02:00
cp -r ~/config/scripts/ ~/
2020-09-09 20:56:53 +02:00
2020-04-10 13:03:58 +02:00
#copy stuff to /etc
2020-04-18 23:36:24 +02:00
sudo cp -r ~/config/etc /
2020-09-09 20:56:53 +02:00
# NOTE Distro specific stuff
distro=$(cat /etc/*-release | grep "^ID=")
if [ "$distro" == "ID=arcolinux" ]; then
sudo mv /etc/arco-pacman.conf /etc/pacman.conf
fi
if [ "$distro" == "ID=arch" ]; then
sudo mv /etc/arch-pacman.conf /etc/pacman.conf
fi
#copy old lightdm themes (and maybe other stuff, idk)
2020-04-18 23:36:24 +02:00
sudo cp -r ~/config/var /
2020-03-12 11:44:07 +01:00
#copy usr stuff
sudo cp -r ~/config/usr /
2020-10-27 16:32:26 +01:00
# copy xresources
cp ~/config/.Xresources ~/
2020-04-15 11:18:39 +02:00
#gimp plugins
2020-10-12 20:12:33 +02:00
mkdir ~/.config/GIMP/ || echo Not creating directory
mkdir ~/.config/GIMP/2.10/ || echo Not creating directory
mkdir ~/.config/GIMP/2.10/plug-ins/ || echo Not creating directory
2020-09-09 20:56:53 +02:00
rsync -ah ~/config/gimp-plugins/* ~/.config/GIMP/2.10/plug-ins/
2020-07-30 11:46:34 +02:00
2020-04-15 11:21:46 +02:00
#unzip gimp plugins
2020-04-15 11:27:07 +02:00
echo Unzipping gimp plugins
2020-10-12 20:09:57 +02:00
unzip -o ~/.config/GIMP/2.10/plug-ins/export_layers-3.3.1.zip -d ~/.config/GIMP/2.10/plug-ins/ > /dev/null
rm ~/.config/GIMP/2.10/plug-ins/export_layers-3.3.1.zip > /dev/null
2020-04-15 11:21:46 +02:00
echo Unzipped gimp plugins
2020-04-15 11:18:39 +02:00
2020-03-12 11:44:07 +01:00
#make bash scripts executable
chmod +x -R ~/.config/polybar/
chmod +x -R ~/.config/i3/scripts
chmod +x -R ~/scripts
# make applications executable
chmod +x -R ~/.local/share/applications
2020-03-12 11:44:07 +01:00
#remove downloaded folder
2020-04-18 23:36:24 +02:00
rm -rf ~/config
2020-03-12 11:44:07 +01:00
2020-11-09 20:12:32 +01:00
# reload applications
update-desktop-database ~/.local/share/applications/
2020-09-09 20:56:53 +02:00
#sync doom-emacs
~/.emacs.d/bin/doom sync
2020-10-27 16:34:16 +01:00
# reload .Xresources
xrdb ~/.Xresources
2020-03-12 11:44:07 +01:00
#restart i3 in place
i3 restart
#output
echo Finished updating everything!
echo Launching new shell!
#new shell to reload .bashrc and fish config
exec bash