-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall.sh
executable file
·69 lines (49 loc) · 1.12 KB
/
install.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
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
#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export DIR
if [[ -f .env ]]; then
source .env
fi
if [[ -z "${DOTPICKLES_ROLE}" ]]; then
if [[ $(hostname) =~ ^josh-nichols- ]]; then
DOTPICKLES_ROLE="work"
else
DOTPICKLES_ROLE="personal"
fi
fi
echo "role: $DOTPICKLES_ROLE"
# shellcheck source=./functions.sh
source ./functions.sh
if running_macos; then
# Prevent sleeping during script execution, as long as the machine is on AC power
caffeinate -s -w $$ &
fi
git submodule init
git submodule update
link_directory_contents home
mkdir -p "$HOME/.config"
link_directory_contents config
echo
./gitconfig.sh
if running_macos; then
load_brew_shellenv
if ! brew_available; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
load_brew_shellenv
fi
brew_bundle
echo "🍎 configuring macOS defaults"
~/.macos
echo
echo "🔐 configuring SSH to use keychain"
ssh-add --apple-load-keychain
# ./gh-shorthand.sh
fi
if ! running_codespaces; then
./vim.sh
./tmux.sh
./fish.sh
./bash.sh
fi
echo "✅ Done"