/
install.sh
executable file
·22 lines (20 loc) · 783 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh
# If $XDG_CONFIG_HOME it's not set
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
# If $XDG_CONFIG_HOME doesnìt exist
[ ! -d "$XDG_CONFIG_HOME" ] && mkdir -p "$XDG_CONFIG_HOME"
# If BASHTHINGS_FOLDER it's not set
[ -z "$BASHTHINGS_FOLDER" ] && export BASHTHINGS_FOLDER="$XDG_CONFIG_HOME"/bash_things
export LOGFILE="$HOME/bashthings-install.log"
[ -f "$LOGFILE" ] && rm "$LOGFILE" # Delete logfile if exist
# If bash things folder doesn't exist
[ ! -d "$BASHTHINGS_FOLDER" ] && {
echo "Clone bash things"
git clone https://gitlab.com/eathtespagheti/bash-things.git "$BASHTHINGS_FOLDER"
echo
}
# "$BASHTHINGS_FOLDER/scripts/bash-things-update.sh"
# echo
echo "Execute firstrun script"
echo
"$BASHTHINGS_FOLDER/firstrun/firstrun.sh" "$@"