Create a gist now

Instantly share code, notes, and snippets.

Embed
for i in $HOME/local/*; do
[ -d $i/bin ] && PATH="${i}/bin:${PATH}"
[ -d $i/sbin ] && PATH="${i}/sbin:${PATH}"
[ -d $i/include ] && CPATH="${i}/include:${CPATH}"
[ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}"
[ -d $i/lib ] && LD_RUN_PATH="${i}/lib:${LD_RUN_PATH}"
# uncomment the following if you use macintosh
# [ -d $i/lib ] && DYLD_LIBRARY_PATH="${i}/lib:${DYLD_LIBRARY_PATH}"
[ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}"
[ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}"
done
# This allows you to install programs into $HOME/local/someprogram
# for example, when I install node locally I install it like this:
#
# ./configure --prefix=$HOME/local/node-v0.8.4
# make
# make install
#
# To uninstall a program, just rm -rf $HOME/local/someprogram
#
@killwing

This comment has been minimized.

Show comment
Hide comment
@killwing

killwing Jul 28, 2012

finally my PATHs become very long...

finally my PATHs become very long...

@samsonjs

This comment has been minimized.

Show comment
Hide comment
@samsonjs

samsonjs Jul 28, 2012

At least on a Mac where there is no /usr/local by default I just sudo mkdir /usr/local; sudo chown -R $USER /usr/local

At least on a Mac where there is no /usr/local by default I just sudo mkdir /usr/local; sudo chown -R $USER /usr/local

@fivetanley

This comment has been minimized.

Show comment
Hide comment
@fivetanley

fivetanley Jul 29, 2012

All of my love.

All of my love.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment