Import from 1.9a8 tarball
[mozilla-nss.git] / security / nss / cmd / shlibsign / sign.sh
blob764012d7b8c23eca7138503edf0cc170d398e74e
1 #!/bin/sh
2 case "${3}" in
3 WIN*)
4 if echo "${PATH}" | grep -c \; >/dev/null; then
5 PATH=${1}/lib\;${1}/bin\;${4}\;${PATH}
6 else
7 # ARG1 is ${1} with the drive letter escaped.
8 if echo "${1}" | grep -c : >/dev/null; then
9 ARG1=`(cd ${1}; pwd)`
10 else
11 ARG1=${1}
13 if echo "${4}" | grep -c : >/dev/null; then
14 ARG4=`(cd ${4}; pwd)`
15 else
16 ARG4=${4}
18 PATH=${ARG1}/lib:${ARG1}/bin:${ARG4}:${PATH}
20 export PATH
21 echo ${2}/shlibsign -v -i ${5}
22 ${2}/shlibsign -v -i ${5}
24 OpenVMS)
25 temp="tmp$$.tmp"
26 temp2="tmp$$.tmp2"
27 cd ${1}/lib
28 vmsdir=`dcl show default`
29 ls *.so > $temp
30 sed -e "s/\([^\.]*\)\.so/\$ define\/job \1 ${vmsdir}\1.so/" $temp > $temp2
31 echo '$ define/job getipnodebyname xxx' >> $temp2
32 echo '$ define/job vms_null_dl_name sys$share:decc$shr' >> $temp2
33 dcl @$temp2
34 echo ${2}/shlibsign -v -i ${5}
35 ${2}/shlibsign -v -i ${5}
36 sed -e "s/\([^\.]*\)\.so/\$ deass\/job \1/" $temp > $temp2
37 echo '$ deass/job getipnodebyname' >> $temp2
38 echo '$ deass/job vms_null_dl_name' >> $temp2
39 dcl @$temp2
40 rm $temp $temp2
43 LIBPATH=`(cd ${1}/lib; pwd)`:`(cd ${4}; pwd)`:$LIBPATH
44 export LIBPATH
45 SHLIB_PATH=${1}/lib:${4}:$SHLIB_PATH
46 export SHLIB_PATH
47 LD_LIBRARY_PATH=${1}/lib:${4}:$LD_LIBRARY_PATH
48 export LD_LIBRARY_PATH
49 DYLD_LIBRARY_PATH=${1}/lib:${4}:$DYLD_LIBRARY_PATH
50 export DYLD_LIBRARY_PATH
51 LIBRARY_PATH=${1}/lib:${4}:$LIBRARY_PATH
52 export LIBRARY_PATH
53 ADDON_PATH=${1}/lib:${4}:$ADDON_PATH
54 export ADDON_PATH
55 echo ${2}/shlibsign -v -i ${5}
56 ${2}/shlibsign -v -i ${5}
58 esac