Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Substituting install script for a makefile"

  • Loading branch information...
commit 8e095a38e0466256c958054730cf642dc2b52486 1 parent d843785
James Cleveland authored
Showing with 45 additions and 46 deletions.
  1. +15 −0 MANIFEST
  2. +14 −0 Makefile
  3. +0 −46 install
  4. +16 −0 relink
View
15 MANIFEST
@@ -0,0 +1,15 @@
+.tmux.conf
+.zshenv
+.zshrc
+.xinitrc
+.vimrc
+.ncmpcpp/config
+.zsh
+.i3status.conf
+.i3/config
+.xmonad/xmonad.hs
+.xmobarrc
+.Xresources
+.terminfo/r/rxvt-unicode
+.terminfo/r/rxvt-unicode-256color
+bin
View
14 Makefile
@@ -0,0 +1,14 @@
+upgrade: pull submodules linkfiles source
+
+pull:
+ git pull origin master
+
+linkfiles:
+ zsh relink
+
+submodules:
+ git submodule init; git submodule update
+ git submodule foreach git pull origin master;
+
+source:
+ source ~/.zshrc
View
46 install
@@ -1,46 +0,0 @@
-#!/bin/zsh
-
-export BASE=$(dirname $0)
-BASE=${BASE:a}
-cd $BASE && git pull origin master
-
-manifest=(
- .tmux.conf
- .zshenv
- .zshrc
- .xinitrc
- .vimrc
- .ncmpcpp/config
- .zsh
- .i3status.conf
- .i3/config
- .xmonad/xmonad.hs
- .xmobarrc
- .Xresources
- .terminfo/r/rxvt-unicode
- .terminfo/r/rxvt-unicode-256color
- bin
-)
-
-relink () {
- real=$BASE/$1
- real=${real:a}
- new=$HOME/$1
- newdir=${new:h}
- [[ -d $newdir ]] || mkdir -p $newdir
- [[ -h $new ]] && unlink $new
- [[ -f $new ]] && rm $new
- ln -s $real $new && echo "linked $new -> $real"
-}
-
-[[ -f $BASE/../.tmux.hotkey ]] || cp $BASE/.tmux.hotkey.sample $BASE/../.tmux.hotkey
-
-git submodule init; git submodule update
-git submodule foreach git pull origin master;
-
-for x in $manifest
-do
- relink $x
-done
-
-source ~/.zshrc
View
16 relink
@@ -0,0 +1,16 @@
+#!/bin/zsh
+
+relink () {
+ old=$PWD/$1
+ new=~/$1
+ newdir=${new:h}
+ [[ -d $newdir ]] || mkdir -p $newdir
+ [[ -h $new ]] && unlink $new
+ [[ -f $new ]] && rm $new
+ ln -s $old $new && echo "linked $new -> $old"
+}
+
+while read x
+do
+ relink $x
+done < MANIFEST
Please sign in to comment.
Something went wrong with that request. Please try again.