-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·48 lines (41 loc) · 1.4 KB
/
install.sh
File metadata and controls
executable file
·48 lines (41 loc) · 1.4 KB
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
#!/bin/bash
set -eu
if [ -d "$HOME/.cc_dotfiles" ]; then
echo "You already have Campus Code Dotfiles installed."
exit 0
fi
echo "Installing Campus Code Dotfiles"
echo "We'll install:"
echo " - zsh, tmux, vim, git, silver searcher"
echo " - mise with Ruby and Node.js"
echo " - dotfiles configuration (symlinks, plugins, fonts)"
case "$(uname -s)" in
Linux)
bash "$(dirname "$0")/ubuntu.sh"
;;
Darwin)
bash "$(dirname "$0")/mac.sh"
eval "$(/opt/homebrew/bin/brew shellenv 2>/dev/null || /usr/local/bin/brew shellenv)"
;;
*)
echo "Operational system not supported, aborting installation"
exit 1
;;
esac
# Install mise with Ruby and Node.js — common to all platforms
curl https://mise.run | sh
eval "$(~/.local/bin/mise activate bash)"
mise settings ruby.compile=false
mise use --global ruby
mise use --global node
if [ -z "${LOCAL_INSTALL:-}" ]; then
echo "Installing from remote source"
git clone --depth=10 https://github.com/campuscode/cc_dotfiles.git "$HOME/.cc_dotfiles"
else
echo "Installing from local source"
rsync -a --no-perms --exclude='.vagrant' --exclude='.git' --exclude='tags' --exclude='vim/autoload' --exclude='vim/bundle' --exclude='vim/backups' . "$HOME/.cc_dotfiles"
curl -fLo "$HOME/.cc_dotfiles/vim/autoload/plug.vim" --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
cd "$HOME/.cc_dotfiles"
rake install