From 62349e337dc1e7696c4ab97bc88843f152ecfc82 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 14 Apr 2014 13:52:10 -0700 Subject: [PATCH] Move non-shell related things to resources. --- bootstrap.sh | 2 +- {dotfiles/lib => resources}/apt-get.sh | 0 {dotfiles/lib => resources}/brew.sh | 0 {dotfiles/lib => resources}/osx.sh | 0 setup.sh | 27 +++++++++++++------------- 5 files changed, 15 insertions(+), 14 deletions(-) rename {dotfiles/lib => resources}/apt-get.sh (100%) rename {dotfiles/lib => resources}/brew.sh (100%) rename {dotfiles/lib => resources}/osx.sh (100%) diff --git a/bootstrap.sh b/bootstrap.sh index a6f5d702..12f5fd79 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh case `uname` in 'Darwin') readlink_command='greadlink' diff --git a/dotfiles/lib/apt-get.sh b/resources/apt-get.sh similarity index 100% rename from dotfiles/lib/apt-get.sh rename to resources/apt-get.sh diff --git a/dotfiles/lib/brew.sh b/resources/brew.sh similarity index 100% rename from dotfiles/lib/brew.sh rename to resources/brew.sh diff --git a/dotfiles/lib/osx.sh b/resources/osx.sh similarity index 100% rename from dotfiles/lib/osx.sh rename to resources/osx.sh diff --git a/setup.sh b/setup.sh index 8a5eec8d..11914e5d 100755 --- a/setup.sh +++ b/setup.sh @@ -1,16 +1,21 @@ -#!/bin/bash -# Assumes that gcc, make and git as well as a package manager (brew, -# apt-get) is installed on the system. - -# Go to the source directory of this script. -cd "$(dirname "${BASH_SOURCE}")" +#!/bin/sh +case `uname` in + 'Darwin') + readlink_command='greadlink' + ;; + *) + readlink_command='readlink' +esac +DOTFILES_DIRECTORY="$(dirname "${BASH_SOURCE}" | xargs ${readlink_command} -f)" +cd $DOTFILES_DIRECTORY case `uname` in 'Darwin') - source .brew - ;; + source resources/osx.sh + source resources/brew.sh + ;; 'Linux') - source .apt-get + source resources/apt-get.sh ;; esac @@ -24,7 +29,3 @@ function install_python_packages() { echo "Installing Dot Files." source bootstrap.sh -echo "Installing Tmux Configuration." -tmux-powerline/generate_conf.sh -echo "Installing oh-my-zsh." -oh-my-zsh/install.sh -f