File size: 785 Bytes
7e59e4c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# Copyright (C) 2015 by Pedro Mendes, Virginia Tech Intellectual 
# Properties, Inc., University of Heidelberg, and The University 
# of Manchester. 
# All rights reserved. 

#

DIRECTORY=$(cd `dirname $0` && pwd)

BIN_DIR=$1
if [ "_$BIN_DIR" = "_" ]; then
 echo need bin dir!
 exit 1;
fi

ARCH=`uname -m`
DEP_SUFFIX=-32
if [ $ARCH = "x86_64" ]; then
DEP_SUFFIX=-64
fi

if [ -d "/Applications/" ]; then
OS=DARWIN
DEP_SUFFIX=
fi

if [ ! -d $BIN_DIR/copasi ]; then
  echo binary dir does not exist
  exit 1;
fi

if [ ! -f $BIN_DIR/copasi/libCOPASISE.a ]; then
  echo libCOPASISE not present
  exit 1;
fi


cd $BIN_DIR/copasi

tar -cf se$DEP_SUFFIX.tar libCOPASISE.a
gzip se$DEP_SUFFIX.tar
mv se$DEP_SUFFIX.tar.gz $DIRECTORY
cd $DIRECTORY

echo created se$DEP_SUFFIX.tar.gz