diff options
| author | jason | 2017-04-20 16:26:08 -0600 |
|---|---|---|
| committer | jason | 2017-04-20 16:26:08 -0600 |
| commit | c8cbfca2650ae3502508fa2d04cfa24c8923a851 (patch) | |
| tree | 6262cde5cd92a7bff9816de414e1c4d74ffa7cb5 | |
| parent | 281832999825334accd1da552d7e028efd8b3e2f (diff) | |
| download | dotfiles-c8cbfca2650ae3502508fa2d04cfa24c8923a851.tar.gz dotfiles-c8cbfca2650ae3502508fa2d04cfa24c8923a851.zip | |
Update move in scripts
| -rwxr-xr-x | common_move_in.sh | 28 | ||||
| -rwxr-xr-x | move_in.sh | 15 | ||||
| -rwxr-xr-x | os-x_move_in.sh | 10 | ||||
| -rw-r--r-- | ubuntu_move_in.sh | 16 |
4 files changed, 53 insertions, 16 deletions
diff --git a/common_move_in.sh b/common_move_in.sh index 26eb153..1a441b6 100755 --- a/common_move_in.sh +++ b/common_move_in.sh | |||
| @@ -12,39 +12,29 @@ if ! [ -d "$HOME/Code" ]; then | |||
| 12 | mkdir $HOME/Code | 12 | mkdir $HOME/Code |
| 13 | fi | 13 | fi |
| 14 | 14 | ||
| 15 | cd ~/Code | 15 | if ! [ -d "$HOME/dotfiles" ]; then |
| 16 | 16 | git clone git@beehive.io:jason/dotfiles.git | |
| 17 | if ! [ -d "$HOME/Code/dotfiles" ]; then | ||
| 18 | git clone git@codesaloon.com:jason/dotfiles.git | ||
| 19 | cd dotfiles | 17 | cd dotfiles |
| 20 | else | 18 | else |
| 21 | cd dotfiles | 19 | cd dotfiles |
| 22 | git pull | 20 | git pull |
| 23 | fi | 21 | fi |
| 24 | CWD=`pwd` | ||
| 25 | |||
| 26 | if ! [ -e "$HOME/bin"]; then | ||
| 27 | mkdir $HOME/bin/ | ||
| 28 | cd $HOME/bin/ | ||
| 29 | curl -O http://orgmode.org/worg/code/awk/ical2org.awk | ||
| 30 | fi | ||
| 31 | 22 | ||
| 32 | if ! [ -e "$HOME/.vimrc" ]; then | 23 | if ! [ -e "$HOME/.vimrc" ]; then |
| 33 | echo "Linking vim settings..." | 24 | echo "Linking vim settings..." |
| 34 | ln -s $CWD/vim $HOME/.vim | 25 | stow vim |
| 35 | ln -s $CWD/vim/vimrc $HOME/.vimrc | ||
| 36 | fi | 26 | fi |
| 37 | 27 | ||
| 38 | if ! [ -e "$HOME/.zshrc" ]; then | 28 | if ! [ -e "$HOME/.zshrc" ]; then |
| 39 | echo "Linking .zshrc..." | 29 | echo "Linking .zshrc..." |
| 40 | ln -s $CWD/zshrc $HOME/.zshrc | 30 | stow zsh |
| 41 | fi | 31 | fi |
| 42 | 32 | ||
| 43 | # OS X Only setup | 33 | # OS X Only setup |
| 44 | if [[ $OSTYPE == darwin* ]]; then | 34 | if [[ $OSTYPE == darwin* ]]; then |
| 45 | if ! [ -e "$HOME/.amethyst" ]; then | 35 | if ! [ -e "$HOME/.amethyst" ]; then |
| 46 | echo "Linking amethyst config..." | 36 | echo "Linking amethyst config..." |
| 47 | ln -s $CWD/amethyst $HOME/.amethyst | 37 | stow amethyst |
| 48 | fi | 38 | fi |
| 49 | 39 | ||
| 50 | if [ -e "/usr/bin/vagrant" ] && [ -e "$CWD/../vagrant-vmware-license.lic" ]; then | 40 | if [ -e "/usr/bin/vagrant" ] && [ -e "$CWD/../vagrant-vmware-license.lic" ]; then |
| @@ -54,4 +44,12 @@ if [[ $OSTYPE == darwin* ]]; then | |||
| 54 | fi | 44 | fi |
| 55 | fi | 45 | fi |
| 56 | 46 | ||
| 47 | CWD=`pwd` | ||
| 48 | |||
| 49 | if ! [ -e "$HOME/bin"]; then | ||
| 50 | mkdir $HOME/bin/ | ||
| 51 | cd $HOME/bin/ | ||
| 52 | curl -O http://orgmode.org/worg/code/awk/ical2org.awk | ||
| 53 | fi | ||
| 54 | |||
| 57 | echo "Done." | 55 | echo "Done." |
diff --git a/move_in.sh b/move_in.sh new file mode 100755 index 0000000..453208b --- /dev/null +++ b/move_in.sh | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | CURL='curl --silent --insecure --location' | ||
| 4 | |||
| 5 | if [[ $OSTYPE == darwin* ]]; then | ||
| 6 | echo "OS X detected. Executing os-x_move_in.sh" | ||
| 7 | $CURL https://beehive.io/jason/dotfiles/raw/master/os-x_move_in.sh | ||
| 8 | fi | ||
| 9 | |||
| 10 | if [[ $OSTYPE == linux-gnu ]]; then | ||
| 11 | if [[ `lsb_release -i -s` == Ubuntu ]]; then | ||
| 12 | echo "Ubuntu detected. Executing ubuntu_move_in.sh" | ||
| 13 | $CURL https://beehive.io/jason/dotfiles/raw/master/ubuntu_move_in.sh | sh | ||
| 14 | fi | ||
| 15 | fi | ||
diff --git a/os-x_move_in.sh b/os-x_move_in.sh index 8b16c6a..464ed0c 100755 --- a/os-x_move_in.sh +++ b/os-x_move_in.sh | |||
| @@ -84,6 +84,16 @@ if ! [ -d '/Applications/LastPass.app' ]; then | |||
| 84 | read -p "Press [Enter] key to continue..." | 84 | read -p "Press [Enter] key to continue..." |
| 85 | fi | 85 | fi |
| 86 | 86 | ||
| 87 | cd $HOME | ||
| 88 | |||
| 89 | if ! [ -d "$HOME/dotfiles" ]; then | ||
| 90 | git clone git@beehive.io:jason/dotfiles.git | ||
| 91 | cd dotfiles | ||
| 92 | else | ||
| 93 | cd dotfiles | ||
| 94 | git pull | ||
| 95 | fi | ||
| 96 | |||
| 87 | ./common_move_in.sh | 97 | ./common_move_in.sh |
| 88 | 98 | ||
| 89 | open "/opt/homebrew-cask/Caskroom/little-snitch/3.5.1/Little Snitch Installer.app" | 99 | open "/opt/homebrew-cask/Caskroom/little-snitch/3.5.1/Little Snitch Installer.app" |
diff --git a/ubuntu_move_in.sh b/ubuntu_move_in.sh index df234e4..3c18ed9 100644 --- a/ubuntu_move_in.sh +++ b/ubuntu_move_in.sh | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | echo "Updaing and dist-upgrading" | ||
| 1 | sudo apt-get update && sudo apt-get -y dist-upgrade | 2 | sudo apt-get update && sudo apt-get -y dist-upgrade |
| 2 | 3 | ||
| 3 | sudo apt-get install -y git i3 | 4 | echo "Installing some utilities" |
| 5 | sudo apt-get install -y git stow | ||
| 6 | |||
| 7 | cd $HOME | ||
| 8 | |||
| 9 | if ! [ -d "$HOME/dotfiles" ]; then | ||
| 10 | echo "Dotfiles not found... cloning" | ||
| 11 | git clone git@beehive.io:jason/dotfiles.git | ||
| 12 | cd dotfiles | ||
| 13 | else | ||
| 14 | echo "Dotfiles found... updating" | ||
| 15 | cd dotfiles | ||
| 16 | git pull | ||
| 17 | fi | ||