source: orange/install-scripts/linux/createSnapshot.sh @ 3296:1ca7cfa1021d

Revision 3296:1ca7cfa1021d, 1.4 KB checked in by cvso <cvso@…>, 7 years ago (diff)

* empty log message *

Line 
1#!/bin/sh
2
3cd /home/orange/distribution
4rm -Rf /home/orange/distribution/*
5
6#preparing all neccessary things for snapshot to be created and put to the \\estelle\download directory
7if [ $# -lt 6 ]; then
8        echo "only $# parameters given"
9    echo "Usage: ./createSnapshot <CVS tag> <output filename> <type of build> <daytag> <var name in filenames.set> <compile>"
10    exit 1
11fi
12
13VARNAME=$5
14NEWFILE=$2
15COMPILE=$6
16/home/orange/mount_estelleDownload
17if ! sh /home/orange/install-scripts/linux/createOrangeDist.sh $1 $2 $3 $4 $6 ; then
18        cd /home/orange/distribution/orange
19        mail -s "Linux: ERROR compiling Orange" tomaz.curk@fri.uni-lj.si,janez.demsar@fri.uni-lj.si < ../output.log
20        cat ../output.log
21        echo -e "\n\nERROR compiling when creating distribution, see log above"
22        /home/orange/umount_estelleDownload
23        exit 1;
24fi
25
26if [ ! -e $NEWFILE ]; then
27    echo "Something went wrong, see log files (new file does not exist)"
28        /home/orange/umount_estelleDownload
29    exit 1
30fi
31
32OLDFILE=`grep $VARNAME\= /home/orange/estelleDownload/filenames.set | awk -F\= '{print $2}' | tr -d '\r'`
33grep -v $VARNAME\= /home/orange/estelleDownload/filenames.set > filenames.new.set
34echo $VARNAME=$NEWFILE >> filenames.new.set
35
36rm /home/orange/estelleDownload/$OLDFILE
37cp $NEWFILE /home/orange/estelleDownload/.
38cp filenames.new.set /home/orange/estelleDownload/filenames.set
39
40/home/orange/umount_estelleDownload
41
Note: See TracBrowser for help on using the repository browser.