-
Notifications
You must be signed in to change notification settings - Fork 50
/
install
31 lines (25 loc) · 946 Bytes
/
install
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
PROFILE_REPO="https://github.com/matschaffer/profile.git"
PROFILE_PATH=".profile.d"
if ! type -p git; then
echo "'git' command not found. Please install git first."
echo
echo "I recommend starting with https://github.com/kennethreitz/osx-gcc-installer then using Homebrew (http://mxcl.github.com/homebrew/) to install git. Feel free to contact me via email or GTalk at mat@schaffer.me"
exit 1
fi
cd "$HOME"
mkdir $PROFILE_PATH
git clone $PROFILE_REPO $PROFILE_PATH/core
if [ -f .profile ]; then
echo
echo "Moving current .profile to $PROFILE_PATH/userprofile.conf"
mv .profile $PROFILE_PATH/userprofile.conf
fi
ln -s .profile.d/core/init .profile
for BLOCKING_RC in .bashrc .login .bashprofile; do
if [ -f $BLOCKING_RC ]; then
echo
echo "Warning: Found existing $BLOCKING_RC which may cause .profile not to load."
echo "You may want to move this file into a $PROFILE_PATH/$BLOCKING_RC.conf file."
fi
done
echo