-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathboosters.sample
104 lines (91 loc) · 4.11 KB
/
boosters.sample
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env bash
# USAGE: Source this in the install.sh file or any other that requires these functions.
# There is a much deeper explanation of what everything below means inside
# of the `functions` file in case you were curious.
# At the simplest, we do not want to run this file directly. It should only
# ever be sourced. So we're verifying that before continuing with the file.
#
# We test whether the basename contains either `boosters` or boosters.sample (the default sample)
# This is because we provide a sample boosters file which is NOT sourced in install.sh
# but included in the repository as an example to users. You would rename this file
# from boosters.sample to `boosters` to have it run during the install.
# Why do we do this? We don't want our example to run on a default install. The `boosters`
# file is there for you to customise to your own requirements to extend the defaults
# installed during the run of install.sh
if [[
("$(basename -- "$0")" == "boosters") ||
("$(basename -- "$0")" == "boosters.sample")
]]; then
printf -- "\n\033[31mDon't run $0 directly. It is sourced and run via install.sh.\n";
exit 1
fi
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# EVERYTHING below these lines are purely examples of packages and services you
# might want to install and ways to do it. Customise everything below these
# lines to meet your own unique requirements.
#
# Some examples of things you can include:
# - SSH config
# - Install other languages (e.g. perl, python, etc)
# - Add any Linux package repositories
#
# Since we source this inside of install.sh we can assume the various
# functions such as section, step, echo_success, etc are avaialable.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# -----------------------------------------------------------------------------
# ----- CUSTOMISE THESE AS REQUIRED
# Either your full name or a handle you use (e.g. Github handle)
DOTFILES_GIT_USERNAME=""
# Github user? Be sure to use the same email here that you use on your account.
DOTFILES_GIT_EMAIL=""
DOTFILES_NPM_NAME=""
DOTFILES_NPM_EMAIL=""
DOTFILES_NPM_URL=""
DOTFILES_NPM_LICENSE="MIT"
DOTFILES_NPM_DEFAULT_VERSION="0.1.0"
# -----------------------------------------------------------------------------
# ----- Git settings
section "Git settings"
# Apply the Git user settings to our global config
if [[ $DOTFILES_GIT_EMAIL != "" ]] || [[ $DOTFILES_GIT_USERNAME != "" ]]; then
step "Applying Git global config"
if [[ $DOTFILES_GIT_USERNAME != "" ]]; then
git config --global user.name "${DOTFILES_GIT_USERNAME}"
echo_success "Username set to ${DOTFILES_GIT_USERNAME}"
fi
if [[ $DOTFILES_GIT_EMAIL != "" ]]; then
git config --global user.email "${DOTFILES_GIT_EMAIL}"
echo_success "Email set to ${DOTFILES_GIT_EMAIL}"
fi
fi
# -----------------------------------------------------------------------------
# ----- Node / NPM settings
# ----- NPM INIT SETTINGS
# section "Node settings"
# You can automatically populate some of the fields when running `npm init`
# by setting those in your global ~/.npmrc file instead.
# step "Applying npm global config"
# npm config set init.author.name "${DOTFILES_NPM_NAME}"
# npm config set init.author.email "${DOTFILES_NPM_EMAIL}"
# npm config set init.author.url "${DOTFILES_NPM_URL}"
# npm config set init.license "${DOTFILES_NPM_LICENSE}"
# npm config set init.version "${DOTFILES_NPM_DEFAULT_VERSION}"
# -----------------------------------------------------------------------------
# ----- Some general development settings
section "Development settings"
step "Create development directories"
create_dir "$HOME/Development"
create_dir "$HOME/Development/Node"
create_dir "$HOME/Development/Docs"
# ----- GATSBY SETTINGS
# Disable Gatsby anonymous usage reporting
if command_exists gatsby; then
step "Disable Gatsby telemetry"
gatsby telemetry --disable &>/dev/null
echo_success "Gatsby telemetry disabled"
fi
# -----------------------------------------------------------------------------
# ----- SQLite
section "SQLite"
step "Installing SQLite"
sudo apt-get install -qq -y sqlite3 > /dev/null