summaryrefslogtreecommitdiffstats
path: root/ldap/cm/ntpack.sh
blob: b99f87ee3c062b08b2265e5b43244124c225f670 (plain)
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
71
72
73
74
75
76
#!/bin/sh
#
# BEGIN COPYRIGHT BLOCK
# Copyright 2001 Sun Microsystems, Inc.
# Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
# All rights reserved.
# END COPYRIGHT BLOCK
#

#######################################################################
#
#   Script to pack ldapsdk on NT (uses rtpatch)
#
#   Mahesh Purswani (3/97)
#######################################################################

# Path to the rtpatch installation
RTPATCH=/rtpatch

outfile=outname
reldir=.
olddir=/nonedir
while [ $# -gt 0 ]
do
  case "$1" in
    -o)
	shift
	outfile=$1;;
    -r)
	shift
	reldir=$1;;
     *)
	echo ""
	echo "Usage: $0 [-o outfile] [-r sourcedir]"
	echo ""
	exit 1;;
  esac
  shift
done

if [ ! -d "$olddir" ] ; then
  echo "Making empty old directory $olddir"
  mkdir $olddir
fi

rolddir=`echo $olddir | sed 's#/#\\\\#g'`
rreldir=`echo $reldir | sed 's#/#\\\\#g'`

cat <<EOF > pack.txt
OLDDIR $rolddir /F
NEWDIR $rreldir /F
OUTPUT $outfile
FILE *.*
PATCHFILE
LONGNAMES
PARTIAL
SUBDIRSEARCH
NOPATHSEARCH
IGNOREMISSING
EOF

cat <<EOF > bind.txt
[General]
Platform=Console32
DirectoryPrompt=Please specify install directory (default is current directory): 
IncludeDLL=1
PatchFile=$outfile.rtp
OutputFile=$outfile.exe
EOF

# Run rtpatch
$RTPATCH/pbld-nt @pack.txt
$RTPATCH/pbind bind.txt

echo "Packed release dir = $reldir"
echo "To outfile = $outfile"