-
Notifications
You must be signed in to change notification settings - Fork 0
/
poplogout.sh
70 lines (63 loc) · 1.58 KB
/
poplogout.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# J. Meyer, Nov 1990
# Modified A.Sloman for bash 16 Jul 2009
# poplogout - remove Poplog environment variables from environment
# usage: source poplogout.sh
if [ ! ${usepop} ]; then exit 0 ; fi
# no poplog to logout from
# print a brief message
echo "poplogout": poplog, usepop = $usepop
# BASIC UNSETS: remove variables listed in $usepop/pop/com/popenv
# And others added by A.Sloman
for i in \
popcom \
popsrc \
popsys \
popexternlib \
popautolib \
popdatalib \
popliblib \
poppwmlib \
popsunlib \
popvedlib \
poplocalauto \
poplocalbin \
popsavelib \
popcomppath \
popsavepath \
popexlinkbase \
pop_ved \
pop_help \
pop_ref \
pop_teach \
pop_doc \
pop_im \
pop_eliza \
pop_prolog \
pop_clisp \
pop_pml \
pop_xved \
pop_xvedpro \
pop_xvedlisp \
;
do
## echo $i
unset $i
done
## # UNSET PATH: remove $usepop and $poplocal from path
## set npath=
## foreach i ( $path )
## if (("$i" !~ "$usepop"*) && ("$i" !~ "$poplocal"*) ) set npath=($npath $i)
## end
## set path=($npath)
## unset npath
##
## # TESTED UNSETS: unset conditionally set variables
## if ("$poplocal" == "$usepop/pop") unsetenv poplocal
## if ("$popcontrib" == "$usepop/pop/contrib") unsetenv popcontrib
## if ("$poplib" == "$HOME") unsetenv poplib
## if ($?pop_pop11) unsetenv pop_pop11
## # UNSET USEPOP
unset usepop
unset poplocal
# DONE