home *** CD-ROM | disk | FTP | other *** search
- function setenv
- {
- export $1
- eval $1=\"$2\"
- }
-
- function unsetenv
- {
- eval $1=\"\"
- }
-
- KD=/tmp/kd$$
-
- function source
- {
- if [ -s $1 ]
- then
- printenv >$KD.pe
- csh -c "source $1; echo +E >$KD.csh; /usr/ucb/printenv | comm -23 - $KD.pe >>$KD.csh; echo +A >>$KD.csh; alias >>$KD.csh; echo +S >>$KD.csh; set >>$KD.csh; echo +D >>$KD.csh; dirs >>$KD.csh"
- korner $KD.csh $KD.env
- . $KD.env
- if [ -n "$KDOUT" ]
- then
- cat $KD.env >>$KDOUT
- fi
- rm $KD.*
- else
- echo source: $1 not found
- fi
- }
-