summaryrefslogtreecommitdiff
path: root/spectro/instlib.ksh
blob: 47243e49b52a07afc3870ee6935ec03cb7fb04a3 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#!/bin/sh

# Package up the source and other files for the standalone GPLv2 Instrument library.

# Copyright 2007 - 2013 Graeme W. Gill
# This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :-
# see the License2.txt file for licencing details.

echo "Making standalone GPLv2 instrument archive instlib.zip "

H_FILES="
	../h/sort.h
	"

NUMLIB_FILES="
	../numlib/numsup.h
	../numlib/numsup.c
	"

CGATS_FILES="
	../cgats/pars.h
	../cgats/pars.c
	../cgats/parsstd.c
	../cgats/cgats.h
	../cgats/cgats.c
	../cgats/cgatsstd.c
	"

XICC_FILES="
	../xicc/xspect.h
	../xicc/xspect.c
	../xicc/ccss.h
	../xicc/ccss.c
	../xicc/ccmx.h
	../xicc/ccmx.c
	"

RSPL_FILES="
	../rspl/rspl1.h
	../rspl/rspl1.c
	"

SPECTRO_FILES="
	License2.txt
	spotread.c
	Makefile.OSX
	Makefile.UNIX
	Makefile.WNT
	pollem.h
	pollem.c
	conv.h
	conv.c
	sa_conv.h
	sa_conv.c
	aglob.c
	aglob.h
	hidio.h
	hidio.c
	icoms.h
	dev.h
	inst.h
	inst.c
	insttypes.c
	insttypes.h
	insttypeinst.h
	instappsup.c
	instappsup.h
	disptechs.h
	disptechs.c
	dtp20.c
	dtp20.h
	dtp22.c
	dtp22.h
	dtp41.c
	dtp41.h
	dtp51.c
	dtp51.h
	dtp92.c
	dtp92.h
	ss.h
	ss.c
	ss_imp.h
	ss_imp.c
	i1disp.c
	i1disp.h
	i1d3.h
	i1d3.c
	i1pro.h
	i1pro.c
	i1pro_imp.h
	i1pro_imp.c
	munki.h
	munki.c
	munki_imp.h
	munki_imp.c
	hcfr.c
	hcfr.h
	huey.c
	huey.h
	colorhug.c
	colorhug.h
	spyd2.c
	spyd2.h
	specbos.h
	specbos.c
	kleink10.h
	kleink10.c
	ex1.c
    ex1.h
    smcube.h
	smcube.c
    cubecal.h
	oemarch.c
	oemarch.h
	oeminst.c
	vinflate.c
	inflate.c
	LzmaDec.c
	LzmaDec.h
	LzmaTypes.h
	icoms.c
	icoms_nt.c
	icoms_ux.c
	iusb.h
	usbio.h
	usbio.c
	usbio_nt.c
	usbio_ox.c
	usbio_lx.c
	rspec.h
	rspec.c
	xdg_bds.c
	xdg_bds.h
	base64.h
	base64.c
	xrga.h
	xrga.c
	"

FILES=" $H_FILES $CGATS_FILES $NUMLIB_FILES $RSPL_FILES $XICC_FILES $SPECTRO_FILES "

rm -f instlib.zip
rm -rf _zipdir
rm -f _ziplist
mkdir _zipdir
mkdir _zipdir/instlib


# Archive the Argyll files needed
for j in $FILES
do
	if [ ! -e ${j} ] ; then
		echo "!!!!!!!!!!!!!!!!!!!!!!!!!!! Can't find file ${j} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
		NOTFOUND="$NOTFOUND ${j}"
	else 
		cp ${j} _zipdir/instlib/${j##*/}
		echo instlib/${j##*/} >> _ziplist
	fi
done

# Plus renamed files
cp IntsLib_Readme.txt _zipdir/instlib/Readme.txt
echo instlib/Readme.txt >> _ziplist
cp Makefile.SA _zipdir/instlib/Makefile
echo instlib/Makefile >> _ziplist
cp ../h/aconfig.h _zipdir/instlib/sa_config.h
echo instlib/sa_config.h >> _ziplist

# Create usb archive

for j in `cat ../usb/afiles | grep -E -v 'afiles|binfiles.msw|binfiles.osx|binfiles.lx|Jamfile|ArgyllCMS.inf.t|ArgyllCMS.inf.d'`
do
	echo "File ${j}"

	# Create any needed temporary directories

	tt=usb/${j}
	path=${tt%/*}		# extract path without filename
		
	echo "path ${path}"

	if [ ! -e _zipdir/instlib/${path} ] ; then                     # if not been created
		echo "Creating directory _zipdir/instlib/${path}"
		mkdir -p _zipdir/instlib/${path}
	fi

	tt=../${tt}

	if [ ! -e ${tt} ] ; then
		echo "!!!!!!!!!!!!!!!!!!!!!!!!!!! Can't find file ${tt} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
		NOTFOUND="$NOTFOUND ${tt}"
	else 
		cp ${tt} _zipdir/instlib/usb/${j}
		echo instlib/usb/${j} >> _ziplist
	fi
done

cd _zipdir
zip -9 -m ../instlib.zip `cat ../_ziplist`
cd ..
rm -rf _zipdir
rm -f _ziplist

if [ "X$NOTFOUND" != "X" ] ; then
	echo "!!!!!! Didn't find $NOTFOUND !!!!!!"
fi

echo "Created instlib.zip"