Changeset 1597
- Timestamp:
- 08/06/09 07:45:12 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/cron/nightlyrun.sh
r1595 r1597 6 6 function timer() 7 7 { 8 #if no input: return time, else return elapsed time 8 9 if [[ $# -eq 0 ]]; then 9 10 echo $(date '+%s') … … 21 22 fi 22 23 } 23 function today date()24 function today_date() 24 25 { 25 export today=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`;26 #return today date 26 27 suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'` 27 echo $suffix; 28 echo $suffix; 29 } 30 function host_name() 31 { 32 #return host name depending on the OS 33 if [[ "$1" == "winxp32" ]] 34 then 35 HOST_NAME=`hostname`; 36 else 37 HOST_NAME=`hostname -s`; 38 fi 39 echo $HOST_NAME; 28 40 } 29 41 … … 41 53 42 54 #create nightly run variables 43 export TODAY=$(today date);44 export HOST_NAME= `hostname`;55 export TODAY=$(today_date); 56 export HOST_NAME=$(host_name $OS); 45 57 export ISSM_RELEASE="issm" 46 58 export OS 59 echo $HOST_NAME 60 exit 47 61 48 62 #create ISSM variables … … 149 163 From: "ISSM Nightly run" <$EMAIL_ADRESS> 150 164 To: $i 151 Subject: Nightly runs of $ISSM_RELEASE 165 Subject: Nightly runs of $ISSM_RELEASE, operating system: $OS. 152 166 Mime-Version: 1.0 153 167 Content-Type: text/html … … 157 171 From: "ISSM Nightly run" <$EMAIL_ADRESS> 158 172 To: $i 159 Subject: Nightly runs of $ISSM_RELEASE 173 Subject: Nightly runs of $ISSM_RELEASE, operating system: $OS. 160 174 Mime-Version: 1.0 161 175 Content-Type: text/html
Note:
See TracChangeset
for help on using the changeset viewer.