source: issm/branches/trunk-larour-NatGeoScience2016/packagers/ubuntu/package.sh@ 22893

Last change on this file since 22893 was 22893, checked in by Eric.Larour, 7 years ago

CHG: accepting packages from trunk.

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2
3echo "modify generic"
4cd $ISSM_DIR/bin
5cat generic_static.m | sed -e "s/generic_static/generic/g" > generic.m
6echo "move mpiexec to bin"
7cp ../externalpackages/mpich/install/bin/mpiexec .
8cp ../externalpackages/mpich/install/bin/hydra_pmi_proxy .
9echo "move gmsh to bin"
10if [ -f ../externalpackages/gmsh/install/gmsh ]; then
11 cp ../externalpackages/gmsh/install/gmsh .
12else
13 echo "gmsh not found"
14fi
15
16#Check that test101 runs
17cd $ISSM_DIR/test/NightlyRun
18rm matlab.log
19/usr/local/MATLAB/R2015a/bin/matlab -nojvm -nosplash -r "try, addpath $ISSM_DIR/bin $ISSM_DIR/lib; runme('id',101);exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log
20
21if [[ $(cat matlab.log | grep -c SUCCESS) -lt 10 ]]; then
22 echo "test101 FAILED"
23 exit 1;
24else
25 echo "test101 passed"
26fi
27
28tarball_name='issm-ubuntu-static_build.tar.gz'
29
30echo "Cleanup first"
31cd $ISSM_DIR
32rm $tarball_name
33
34echo "Creating tarball: ${tarball_name}"
35cd $ISSM_DIR
36rm -rf trunk
37mkdir trunk
38cp -rf bin lib test examples scripts trunk/
39tar -czf $tarball_name trunk
40ls -lah $tarball_name
41
42echo "Shipping binaries to website"
43
44# We're using public key authentication method to upload the tarball The
45# following lines check to see if the SSH Agent is running. If not, then it is
46# started and relevant information is forwarded to a script.
47pgrep "ssh-agent" > /dev/null
48if [ $? -ne 0 ]; then
49 echo "SSH Agent is not running. Starting it..."
50 ssh-agent > ~/.ssh/agent.sh
51else
52 echo "SSH Agent is running..."
53fi
54
55source ~/.ssh/agent.sh
56ssh-add ~/.ssh/ubuntu-bins_jenkins-to-ross
57
58scp $tarball_name ross.ics.uci.edu:/var/www/html/$tarball_name
59
60if [ $? -ne 0 ]; then
61 echo "The upload failed."
62 echo "Perhaps the SSH Agent was started by some other means."
63 echo "Try killing the agent and running again."
64fi
Note: See TracBrowser for help on using the repository browser.