Skip to content

Instantly share code, notes, and snippets.

@rctay
Created July 24, 2010 01:44
Show Gist options
  • Save rctay/488298 to your computer and use it in GitHub Desktop.
Save rctay/488298 to your computer and use it in GitHub Desktop.
[git] replace hard linked-builtins with symlinks
#!/bin/sh
BINDIR=/usr/local/bin/
EXECDIR=/usr/local/libexec/git-core
X=.exe
GIT=$BINDIR/git$X
for p in $(ls -1 $EXECDIR); \
do
p=$EXECDIR/$p # already contains the postfix $X
test $p -ef $GIT && \
rm -f $p && \
ln -s $GIT $p && \
echo "symlinked $p"
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment