#!/bin/sh # this works with a 'revar' alias: # # alias revar='source ~/.vars/*' # VARDIR=$HOME/.vars mkdir -p $VARDIR for i in $@ do if [ -d $i ]; then if [ "X$PERL5LIB" = "X" ]; then PERL5LIB=$1 else PERL5LIB=$1:${PERL5LIB} fi fi done export PERL5LIB echo "export PERL5LIB=$PERL5LIB" > ${VARDIR}/p5-lib echo "Please do a 'revar'"