-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·33 lines (26 loc) · 1.13 KB
/
install
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
#!/usr/bin/env bash
set -e
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TERM=xterm
cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
if [ ! -z "$CODESPACES" ]; then
echo "This is a Github codespace, installing neccesary items"
# Delete symlinked gitconfig, commiting won't work otherwisr
rm ~/.config/git/config
echo "Installing from apt"
sudo apt install -y -qq build-essential
echo "Installing brew"
export HOMEBREW_INSTALL_FROM_API=1
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Edits to dotfiles does not matter as much to this environment
fish -i -c "echo 'eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.config/fish/config.fish"
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/codespace/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew bundle --file "$BASEDIR/packages/Brewfile"
fi