-
Notifications
You must be signed in to change notification settings - Fork 58
/
make-data-sdist.sh
executable file
·38 lines (26 loc) · 1.45 KB
/
make-data-sdist.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
#!/bin/sh
# Script to make a distributable version of WebbPSF, with various packaging tweaks
VER="0.2.6"
TAR=/usr/bin/tar # make sure to use the BSD version, required for the -L option
# Create the data tarfile
# make a copy of the filter file excluding FND to appease Gillian Wright, and exclude the FND from the tar file
# Also exclude various things we don't want to distribute, like .svn, the old OPDs, and the data source directories
mv data webbpsf-data
mv webbpsf-data/filters.txt .
# remove FND, and set MIRI filters to the square profiles
cat filters.txt | grep -v FND > webbpsf-data/filters.txt
# link to tophat filters
\rm webbpsf-data/MIRI/filters
ln -s tophat_filters webbpsf-data/MIRI/filters
# create public distributable tar file
$TAR -cvz -L --exclude .svn --exclude OPD_RevT --exclude .DS_Store --exclude sources --exclude "*FND*" --exclude "*_filters" -f webbpsf-data-public-$VER.tar.gz webbpsf-data
# Make a copy with more real data, for internal or CoroWG use
rm webbpsf-data/filters.txt # put the real filters file back
mv filters.txt webbpsf-data/filters.txt
# link to measured filters
\rm webbpsf-data/MIRI/filters
ln -s measured_filters webbpsf-data/MIRI/filters
# create public distributable tar file
$TAR -cvz -L --exclude .svn --exclude OPD_RevT --exclude .DS_Store --exclude sources -f webbpsf-data-internal-$VER.tar.gz webbpsf-data
mv webbpsf-data data
\cp webbpsf-data-public-$VER.tar.gz ~/web/software/webbpsf/webbpsf-data-$VER.tar.gz