File: installer.sh

package info (click to toggle)
adolc 2.7.2-8
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 11,492 kB
  • sloc: cpp: 40,481; ansic: 19,390; sh: 4,277; makefile: 551; python: 486
file content (95 lines) | stat: -rwxr-xr-x 2,235 bytes parent folder | download | duplicates (7)
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
#!/bin/bash -x
INCFILES=(adolc.h adalloc.h adouble.h adutils.h \
	 adutilsc.h advector.h \
         convolut.h fortutils.h \
         interfaces.h param.h taping.h \
         externfcts.h externfcts2.h \
         checkpointing.h fixpoint.h \
         adolc_sparse.h adolc_openmp.h \
         revolve.h adtl.h adoublecuda.h)
INCFILES_SPARSE=(sparsedrivers.h sparse_fo_rev.h)

INCFILES_DRIVERS=(drivers.h odedrivers.h psdrivers.h taylor.h)

INCFILES_TAPEDOC=(tapedoc.h)

INCFILES_LIE=(drivers.h)

INCFILES_INTERNAL=(adolc_settings.h \
                   adubfunc.h paramfunc.h \
                   common.h usrparms.h)

if [[ $# < 1 ]]; then
	echo "usage: installer.sh config [arch]"
	echo "where config is sparse|nosparse"
	echo "and arch is optionally Win32 or x64"
	echo "if omitted arch defaults to Win32"
	exit 0
fi

if [[ $# > 1 ]]; then 
	case $2 in 
		win32|Win32) conf=$1
		       arch=.
		       cf=$1_win32
		       suffix=x86
		       ;;
		x64) conf=x64/$1
		     arch=x64
		     cf=$1_x64
		     suffix=x64
		     ;;
	 esac
else
	 conf=$1
	 arch=.
	 cf=$1_win32
	 suffix=x86
fi

mkdir -p tmp
mkdir -p tmp/include/adolc
mkdir -p tmp/lib
mkdir -p tmp/bin
mkdir -p tmp/doc

mkdir -p tmp/include/adolc/sparse
mkdir -p tmp/include/adolc/drivers
mkdir -p tmp/include/adolc/lie
mkdir -p tmp/include/adolc/tapedoc
mkdir -p tmp/include/adolc/internal

for i in ${INCFILES[*]} ; do
	cp ../../ADOL-C/include/adolc/$i tmp/include/adolc
done

for i in ${INCFILES_SPARSE[*]} ; do
	cp ../../ADOL-C/include/adolc/sparse/$i tmp/include/adolc/sparse
done

for i in ${INCFILES_DRIVERS[*]} ; do
	cp ../../ADOL-C/include/adolc/drivers/$i tmp/include/adolc/drivers
done

for i in ${INCFILES_LIE[*]} ; do
	cp ../../ADOL-C/include/adolc/lie/$i tmp/include/adolc/lie
done

for i in ${INCFILES_TAPEDOC[*]} ; do
	cp ../../ADOL-C/include/adolc/tapedoc/$i tmp/include/adolc/tapedoc
done

for i in ${INCFILES_INTERNAL[*]} ; do
	cp ../../ADOL-C/include/adolc/internal/$i tmp/include/adolc/internal
done

cp $conf/adolc.dll tmp/bin
cp $conf/adolc.lib tmp/lib
cp ../../ADOL-C/doc/* tmp/doc
cp $arch/vc_redist.$suffix.exe tmp/
echo "@echo off" > tmp/setup.bat
echo "vcredist_${suffix}.exe" >> tmp/setup.bat
cd tmp
zip -r ../adolc_$cf.zip ./
cd ..
rm -rf tmp