Rename scripts
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
df6b44e541
commit
410d0b33c6
46 changed files with 566 additions and 249 deletions
131
install
Executable file
131
install
Executable file
|
@ -0,0 +1,131 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# install
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# This is the main installation script for my dotfiles. It setups the symlinks
|
||||
# to the neeeded files, creates new directories, enables systemd services,
|
||||
# installs pacman packages and gives out the correct permissions to files.
|
||||
#
|
||||
# USAGE:
|
||||
# ./install
|
||||
. ./system/.local/bin/utils
|
||||
|
||||
#######################################
|
||||
# Configuration variables
|
||||
#######################################
|
||||
USER="severin"
|
||||
|
||||
# Array of directories which should be created
|
||||
DIRECTORIES=(
|
||||
".local/log"
|
||||
"Build"
|
||||
"Downloads"
|
||||
"Projects"
|
||||
"Videos"
|
||||
"Images"
|
||||
)
|
||||
|
||||
# Array of files which should be symlinked in the home folder
|
||||
LINKED_FILES_HOME=(
|
||||
".config/autokey"
|
||||
".config/bat"
|
||||
".config/cmus"
|
||||
".config/compton"
|
||||
".config/cron"
|
||||
".config/custom"
|
||||
".config/dconf"
|
||||
".config/dunst"
|
||||
".config/git"
|
||||
".config/gtk-2.0"
|
||||
".config/gtk-3.0"
|
||||
".config/httpie"
|
||||
".config/i3"
|
||||
".config/mpv"
|
||||
".config/npm"
|
||||
".config/polybar"
|
||||
".config/python"
|
||||
".config/redshift"
|
||||
".config/streamlink"
|
||||
".config/termite"
|
||||
".config/Trolltech.conf"
|
||||
".config/vim"
|
||||
".config/vue"
|
||||
".config/wget"
|
||||
".config/X11"
|
||||
".config/zsh"
|
||||
".local/bin"
|
||||
)
|
||||
|
||||
# Groups the user should be added to
|
||||
ADD_GROUPS=(
|
||||
"bumblebee"
|
||||
)
|
||||
|
||||
# Array of systemd services which should be enabled
|
||||
SYSTEMD_SERVICES=(
|
||||
"bumblebeed"
|
||||
"cronie"
|
||||
"NetworkManager"
|
||||
"org.cups.cupsd"
|
||||
)
|
||||
|
||||
#######################################
|
||||
# Main code
|
||||
#######################################
|
||||
print_header "Creating directories"
|
||||
for dir in "${DIRECTORIES[@]}"
|
||||
do
|
||||
create_directory "${dir}"
|
||||
done
|
||||
|
||||
print_header "Installing packages"
|
||||
#sudo pacman -S git base-devel --noconfirm
|
||||
|
||||
# Install yay
|
||||
#git clone https://aur.archlinux.org/yay.git
|
||||
#cd yay
|
||||
#makepkg -si --noconfirm --skippgpcheck
|
||||
#cd ..
|
||||
#rm -rf yay
|
||||
|
||||
# Install packages
|
||||
#yay -S --noconfirm $(cat "${PACKAGES_DIR}/packages.list")
|
||||
|
||||
print_header "Creating symlinks"
|
||||
for file in "${LINKED_FILES_HOME[@]}";
|
||||
do
|
||||
create_link "${file}"
|
||||
done
|
||||
|
||||
print_header "Give permissions"
|
||||
set_permission severin 744 "${XDG_BIN_HOME}"
|
||||
|
||||
print_header "Add user to groups"
|
||||
for group in "${ADD_GROUPS[@]}"
|
||||
do
|
||||
add_to_group "${USER}" "${group}"
|
||||
done
|
||||
|
||||
print_header "Enabling systemd services"
|
||||
for service in "${SYSTEMD_SERVICES[@]}"
|
||||
do
|
||||
enable_service "${service}"
|
||||
done
|
||||
|
||||
print_header "Copy custom udev rules"
|
||||
for file in ${SYSTEM_DIR}/etc/udev/rules.d/*.rules
|
||||
do
|
||||
copy_udev_rule "${file}"
|
||||
done
|
||||
sudo udevadm control --reload-rules
|
||||
|
||||
print_header "Copy sudoers content"
|
||||
for file in ${SYSTEM_DIR}/etc/sudoers.d/*
|
||||
do
|
||||
copy_sudoers_content "${file}"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue