diff options
author | Alan Pearce | 2013-10-07 08:16:53 +0100 |
---|---|---|
committer | Alan Pearce | 2013-10-07 08:16:53 +0100 |
commit | b9575ac8de66afd3a74665751760fa2edbda6061 (patch) | |
tree | 13ea584b0152ddb68fa7b193dc59afdab7cfe42e | |
parent | d78b4c91e6985006094ad090f69bbc7b7eaa5da8 (diff) | |
download | nixfiles-b9575ac8de66afd3a74665751760fa2edbda6061.tar.lz nixfiles-b9575ac8de66afd3a74665751760fa2edbda6061.tar.zst nixfiles-b9575ac8de66afd3a74665751760fa2edbda6061.zip |
Move dotfiles under ~/projects
-rwxr-xr-x | install | 31 | ||||
-rwxr-xr-x | zsh/zshrc | 4 |
2 files changed, 18 insertions, 17 deletions
diff --git a/install b/install index 6eb45912..41d82902 100755 --- a/install +++ b/install @@ -1,10 +1,11 @@ #!/usr/bin/env zsh +target=~/projects/dotfiles pushd $HOME setopt EXTENDED_GLOB -if [[ ! -d dotfiles && ${(L)host} =~ prefect ]] +if [[ ! -d $target && ${(L)host} =~ prefect ]] then git clone ssh://alan@home.alanpearce.co.uk:22222/~/dotfiles.git fi @@ -33,13 +34,13 @@ install-dot () { done } -install-dot dotfiles/.git/hooks/ dotfiles/git-hooks/* -install-dot .emacs.d/ dotfiles/emacs/* -install-dot . dotfiles/^install(.) dotfiles/zsh/zshrc dotfiles/zsh/fasdrc -install-dot .ssh/ dotfiles/ssh/* +install-dot $target/.git/hooks/ $target/git-hooks/* +install-dot .emacs.d/ $target/emacs/* +install-dot . $target/^install(.) $target/zsh/zshrc $target/zsh/fasdrc +install-dot .ssh/ $target/ssh/* if [[ -d projects/dwm ]] then - install-dot projects/dwm/ dotfiles/dwm/* + install-dot projects/dwm/ $target/dwm/* fi if [[ -x =emacs ]] @@ -53,30 +54,30 @@ then fi fasd_cache=~/.zsh/cache/fasd-init-zsh -if [[ ! -s "$fasd_cache" || dotfiles/zsh/functions/fasd -nt "$fasd_cache" ]]; then - dotfiles/zsh/functions/fasd/fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >! "$fasd_cache" +if [[ ! -s "$fasd_cache" || $target/zsh/functions/fasd -nt "$fasd_cache" ]]; then + $target/zsh/functions/fasd/fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >! "$fasd_cache" fi autoload -U zrecompile local -a zfiles zfiles=( - dotfiles/zsh/functions/fasd/fasd + $target/zsh/functions/fasd/fasd $fasd_cache - dotfiles/zsh/zshrc + $target/zsh/zshrc ) -if [[ -f dotfiles/zsh/zshrc_${HOST%%.*} ]]; then - zfiles+=dotfiles/zsh/zshrc_${HOST%%.*} +if [[ -f $target/zsh/zshrc_${HOST%%.*} ]]; then + zfiles+=$target/zsh/zshrc_${HOST%%.*} fi if [[ -e /usr/bin/emerge ]]; then - zfiles+=dotfiles/zsh/zshrc_gentoo + zfiles+=$target/zsh/zshrc_gentoo fi if [[ $OSTYPE == freebsd* ]]; then - zfiles+=dotfiles/zsh/zshrc_freebsd + zfiles+=$target/zsh/zshrc_freebsd fi zrecompile -p -R ~/.zshrc.zwc $zfiles -for fp in dotfiles/zsh/functions/*(/); do +for fp in $target/zsh/functions/*(/); do zrecompile -p $fp $fp/* done diff --git a/zsh/zshrc b/zsh/zshrc index bc336e56..672ed7ce 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -24,10 +24,10 @@ then mkdir -p ~/.zsh/cache fi -myfuncs=( ~alan/dotfiles/zsh/functions/*(/) ) +myfuncs=( ~alan/projects/dotfiles/zsh/functions/*(/) ) fpath=( $myfuncs - ~alan/dotfiles/zsh/completion/ + ~alan/projects/dotfiles/zsh/completion/ $fpath ) |