dotfiles/install.sh
Severin Kaderli 006fddf028 Add post-install script
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
2018-12-13 00:18:28 +01:00

98 lines
No EOL
2.1 KiB
Bash
Executable file

#!/bin/bash
#
# Author: Severin Kaderli <severin.kaderli@gmail.com>
# Usage: ./install.sh
. utils.sh
#######################################
# Configuration variables
#######################################
# Array of directories which should be created
DIRECTORIES=(
"Build"
"Downloads"
"Projects"
".logs"
)
# Array of files which should be symlinked in the home folder
LINKED_FILES_HOME=(
".aliases"
".bash_logout"
".bash_profile"
".bashrc"
".config/compton.conf"
".config/dunst"
".config/gtk-3.0"
".config/i3"
".config/polybar"
".config/streamlink"
".config/termite"
".crontab"
".dircolors"
".env"
".gitconfig"
".gtkrc-2.0.mine"
".gtkrc-2.0"
".keyleds"
".vimrc"
".xinitrc"
".xprofile"
".Xresources"
"bin"
)
# Array of systemd services which should be enabled
SYSTEMD_SERVICES=(
"cronie"
"bumblebeed"
)
#######################################
# Main code
#######################################
# Creating needed directories
print_header "Creating directories"
for dir in "${DIRECTORIES[@]}"
do
echo "- Creating $HOME/$dir"
mkdir -p "$HOME/$dir"
done
# Install base-devel for building aur packages
print_header "Installing packages"
#sudo pacman -S git base-devel --noconfirm
# Install aurman
#git clone https://aur.archlinux.org/aurman.git
#cd aurman
#makepkg -si --noconfirm --skippgpcheck
#cd ..
#rm -rf aurman
# Install packages
#aurman -S --noconfirm $(cat "$PACKAGES_DIR/packages.list")
#aurman -S --noconfirm $(cat "$PACKAGES_DIR/packages2.list")
# Create symlinks to dotfiles
print_header "Creating symlinks"
for file in "${LINKED_FILES_HOME[@]}"
do
echo "- Linking $HOME/$file -> $SYSTEM_DIR/$file"
rm -rf "$HOME/$file"
ln -fs "$SYSTEM_DIR/$file" "$HOME/$file"
done
print_header "Asking for root permissions"
sudo -v
# Give scripts execute permissions
print_header "Give permissions"
set_permission severin 744 "$HOME/bin"
print_header "Enabling systemd services"
for service in "${SYSTEMD_SERVICES[@]}"
do
enable_service "$service"
done