-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·63 lines (49 loc) · 1.23 KB
/
setup.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
#!/bin/bash
#
# Copyright (c) 2017-2019, Christian Muehlhaeuser <muesli@gmail.com>
#
# For license see LICENSE
#
set -e
pwd="$(pwd)"
. setup_helpers.sh
# source .profile so we got correct env-vars for setup
source "shell/profile"
# create required dirs
mkdir -p "$GOPATH"
if [[ "$OSTYPE" == "linux"* ]]; then
# Linux
OSID="linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
OSID="macos"
else
# Unknown
echo "Sorry, but setup for '$OSTYPE' is not supported (yet)!"
exit 1
fi
./setup_$OSID.sh
cd "$HOME/Sources"
# Install oh-my-zsh
if [ ! -d "oh-my-zsh" ]
then
git clone https://github.com/muesli/oh-my-zsh.git
fi
cd "$pwd"
./packages/elvish.sh
# Setup profile
linkTo "shell/$OSID/profile" "$HOME/.profile"
# Setup zsh
linkTo "shell/zshrc" "$HOME/.zshrc"
# Setup elvish
linkTo "shell/rc.elv" "$HOME/.elvish/rc.elv"
linkTo "shell/rc_private.elv" "$HOME/.elvish/lib/rc_private.elv"
# Setup git
mkdir -p "$HOME/.config/git"
linkTo "configs/git/config" "$HOME/.config/git/config"
linkTo "configs/git/ignore" "$HOME/.config/git/ignore"
# Setup joe
linkTo "configs/joe/joerc" "$HOME/.joerc"
# Setup micro
linkTo "configs/micro/settings.json" "$HOME/.config/micro/settings.json"
cd "$pwd"