Skip to content
Browse files

Create symlinks to plugin locations.

Instead of making a copy and fixing problems with it (like copying/excluding
.git), we now simply create a soft link to the plugin location.
  • Loading branch information...
1 parent 7e0aca7 commit 2b5d4a0c3fe914e713fd51277b4b2a6cad558e21 @sharat87 sharat87 committed Jun 4, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 antigen.zsh
View
8 antigen.zsh
@@ -100,11 +100,9 @@ bundle-install () {
if [[ $name != *.theme ]]; then
echo Installing $name
- mkdir -p "$ANTIGEN_BUNDLE_DIR/$name"
- pushd "$clone_dir/$loc" > /dev/null
- ls | grep -Fv '.git' \
- | xargs cp -rt "$ANTIGEN_BUNDLE_DIR/$name"
- popd > /dev/null
+ local bundle_dest="$ANTIGEN_BUNDLE_DIR/$name"
+ test -e "$bundle_dest" && rm -rf "$bundle_dest"
+ ln -sT "$clone_dir/$loc" "$bundle_dest"
@sampsyo
sampsyo added a note Jun 4, 2012

Mac OS X's ln doesn't seem to have a -T option:

$ ln -T
ln: illegal option -- T
@sharat87
zsh-users member
sharat87 added a note Jun 5, 2012

Thanks. I removed that argument, which I don't think is necessary anyway. I didn't notice it because that option is available on Linux :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
else
mkdir -p "$ANTIGEN_BUNDLE_DIR/$name"
cp "$clone_dir/$loc" "$ANTIGEN_BUNDLE_DIR/$name"

0 comments on commit 2b5d4a0

Please sign in to comment.
Something went wrong with that request. Please try again.