source: other-projects/expeditee-release-kits/trunk/create-expeditee.sh@ 37921

Last change on this file since 37921 was 37921, checked in by anupama, 10 months ago

Corrected username on internal when uploading.

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3# currentdir is path to expeditee-release-kits
4# http://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
5#currentdir should be the path to expeditee-release-kits
6currentdir=$( cd "$(dirname "$0")" ; pwd -P )
7
8if ! test -f "$currentdir/rke-setup.sh"; then
9 echo ""
10 echo "********************"
11 echo "First edit $currentdir/rke-setup.sh.in"
12 echo "to generate $currentdir/rke-setup.sh"
13 echo ""
14 echo "********************"
15 echo ""
16 exit -1
17else
18 # rke-setup uses local paths, so cd into expeditee-release-kits first
19 # then call rke-setup.sh to source the environment vars it sets
20 pushd "$currentdir"
21 source "rke-setup.sh"
22 returnval=$?
23 if [ "$returnval" != "0" ]; then
24 echo "Error running rke-setup.sh, return value: $returnval"
25 popd
26 exit -2
27 else
28 popd
29
30 # Make sure the expeditee folder and its rke-build.properties file exist
31 # then run the 'rke' command from snapshots\expeditee
32 pushd "$currentdir/snapshots"
33 if test -d expeditee; then
34 echo "Deleting $currentdir/snapshots/expeditee...."
35 rm -rf $currentdir/snapshots/expeditee
36 fi
37 if ! test -d expeditee; then
38 mkdir expeditee
39 fi
40 if ! test -f expeditee/rke-build.properties; then
41 cp $currentdir/rke-build.properties.in expeditee/rke-build.properties
42 fi
43 pushd expeditee
44 rke
45
46 # http://stackoverflow.com/questions/1401482/yyyy-mm-dd-format-date-in-shell-script
47 DATE=`date +%Y-%m-%d`
48
49 # Uploading
50 mkdir uploads
51 cp products/Expeditee-1${products_suffix} uploads/Expeditee-1-${DATE}${uploads_suffix}
52 cp rke.out uploads/rke-${DATE}${out_suffix}.out
53
54 # the ssh inside the lsb cannot use ed25519 keys, so the uploading step is done outside lsb now
55 cd uploads && tar -c * | ssh -T -i "${identity_file}" [email protected]
56
57 exit 0
58 fi
59fi
Note: See TracBrowser for help on using the repository browser.