-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·44 lines (32 loc) · 1.28 KB
/
bootstrap.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
#!/usr/bin/env bash
# For usage with GitHub's codespaces, this should be everything that is needed to setup this dotfiles repo with a
# codespaces virtual environment.
# Global settings
# Set Debug so that we can see what's happening
set -x
# Constants
# This is where vscode puts dotfiles
DOTFILE_LOC=/workspaces/.codespaces/.persistedshare/dotfiles/
# Location for the RCRC script in our dotfiles
export RCRC="${DOTFILE_LOC}/rcrc"
# Install RCM which is used for setting up links to binaries
sudo apt-get install -y rcm tmux
# Change to home directory
pushd "${HOME}" &>/dev/null
# Create dotfiles symlink and bin directory for create_syms and rcup script
ln -sf "${DOTFILE_LOC}" ./dotfiles
mkdir bin
# Run rcup to initialize
rcup -fvvx local
# Call custom create_syms script
"${DOTFILE_LOC}/local/bin/create_syms"
# Install vim plug
mkdir -p ~/.vim/{autoload,plugged}
git clone https://github.com/junegunn/vim-plug.git ~/.vim/plugged/vim-plug
ln -s ~/.vim/plugged/vim-plug/plug.vim ~/.vim/autoload
# Install plugins this appears not to work because when the script is executing its not in an interactive shell
#yes | vim +PlugInstall +qall
# Ensure that /bin/sh is linked to bash instead of dash for git functions
sudo ln -sf /usr/bin/bash /bin/sh
# Go back to where we were
popd &>/dev/null