-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinit.rc.sh
35 lines (29 loc) · 962 Bytes
/
init.rc.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
#!/bin/bash
function exists {
which $1 &> /dev/null
}
function initinstall {
exists $1
if [[ "$?" != "0" ]]; then
echo "$1 not installed. Installing ..."
shift
eval `echo $@`
fi
}
# platform
export PLATFORM=`uname -s`
if [[ "$PLATFORM" == 'Darwin' && `echo "$INSTALLER" | cut -d " " -f 1` == 'brew' ]]; then
initinstall brew ruby -e '"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'
fi
initinstall zsh ${INSTALLER} zsh
initinstall easy_install 'sudo curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo ${PYTHON}'
initinstall pip sudo easy_install pip
initinstall percol sudo pip install percol
initinstall ranger ${INSTALLER} ranger
# This may have compatibility issues on Linux system, testings required
#fp='/usr/local/share/zsh-completions'
#[[ -d $fp ]] || ${INSTALLER} zsh-completions
#if [[ -d $fp ]]; then
# fpath=($fp $fpath)
# rm -f ~/.zcompdump; compinit
#fi