-
Notifications
You must be signed in to change notification settings - Fork 30
/
lets-go.sh
executable file
·44 lines (37 loc) · 1.86 KB
/
lets-go.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
######################################################################
# Lissy93/dotfiles - Remote Runnable Dotfile Setup and Update Script #
######################################################################
# This script will clone + install, or update dotfiles from git #
# Be sure to read through the repo before running anything here #
# For more info, read docs: https://github.com/Lissy93/dotfiles #
# #
# Config Options: #
# - DOTFILES_REPO - Optionally sets the source repo to be cloned #
# - DOTFILES_DIR - Optionally sets the local destination directory #
######################################################################
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
######################################################################
# If not already set, specify dotfiles destination directory and source repo
DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Documents/config/dotfiles}"
DOTFILES_REPO="${DOTFILES_REPO:-https://github.com/lissy93/dotfiles.git}"
# Print starting message
echo -e "\033[1;35m""Lissy93/Dotfiles Installation Script 🧰
\033[0;35mThis script will install or update specified dotfiles:
- From \033[4;35m${DOTFILES_REPO}\033[0;35m
- Into \033[4;35m${DOTFILES_DIR}\033[0;35m
Be sure you've read and understood the what will be applied.\033[0m\n"
# If dependencies not met, install them
if ! hash git 2> /dev/null; then
bash <(curl -s -L 'https://alicia.url.lol/prerequisite-installs')
fi
# If dotfiles not yet present then clone
if [[ ! -d "$DOTFILES_DIR" ]]; then
mkdir -p "${DOTFILES_DIR}" && \
git clone --recursive ${DOTFILES_REPO} ${DOTFILES_DIR}
fi
# Execute setup or update script
cd "${DOTFILES_DIR}" && \
chmod +x ./install.sh && \
./install.sh --no-clear
# EOF