Add post-install script
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
cd781c174e
commit
006fddf028
5 changed files with 136 additions and 100 deletions
33
install.sh
33
install.sh
|
@ -2,6 +2,7 @@
|
|||
#
|
||||
# Author: Severin Kaderli <severin.kaderli@gmail.com>
|
||||
# Usage: ./install.sh
|
||||
. utils.sh
|
||||
|
||||
#######################################
|
||||
# Configuration variables
|
||||
|
@ -29,6 +30,7 @@ LINKED_FILES_HOME=(
|
|||
".config/termite"
|
||||
".crontab"
|
||||
".dircolors"
|
||||
".env"
|
||||
".gitconfig"
|
||||
".gtkrc-2.0.mine"
|
||||
".gtkrc-2.0"
|
||||
|
@ -46,37 +48,6 @@ SYSTEMD_SERVICES=(
|
|||
"bumblebeed"
|
||||
)
|
||||
|
||||
#######################################
|
||||
# Directory variables
|
||||
#######################################
|
||||
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
||||
SYSTEM_DIR="$DIR/system"
|
||||
PACKAGES_DIR="$DIR/packages"
|
||||
|
||||
#######################################
|
||||
# Helper functions
|
||||
#######################################
|
||||
# Function to display fancy headers
|
||||
function print_header() {
|
||||
echo -e "\n\e[32m########################################"
|
||||
echo -e "# $1"
|
||||
echo -e "########################################\e[39m"
|
||||
}
|
||||
|
||||
# Function to set owner and permission of a file
|
||||
function set_permission() {
|
||||
echo -e "- Changing permission of $3 to $1"
|
||||
sudo chown -R "$1" "$3"
|
||||
echo -e "- Changing permission of $3 to $2"
|
||||
sudo chmod -R "$2" "$3"
|
||||
}
|
||||
|
||||
# Function to enable a service
|
||||
function enable_service() {
|
||||
echo -e "- Enabling service $1"
|
||||
sudo systemctl enable "$1"
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Main code
|
||||
#######################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue