-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpt_release.csh
executable file
·79 lines (71 loc) · 1.56 KB
/
rpt_release.csh
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/csh -f
#
# rpt_release.csh
###########################################################################
#
# Purpose:
#
# This script copies the public reports to the public FTP site.
#
# Usage:
#
# rpt_release.csh
#
# Env Vars:
#
# - See Configuration file (reports_db product)
#
# - See master.config.csh (mgiconfig product)
#
# Inputs: None
#
# Outputs:
#
# - Log file for the script (${LOG})
#
# Exit Codes:
#
# 0: Successful completion
# 1: Fatal error occurred
#
# Assumes: Nothing
#
# Implementation:
#
# This script will perform following steps:
#
# 1) Source the configuration file to establish the environment.
# 2) Copy the reports.
#
# Notes: None
#
###########################################################################
cd `dirname $0` && source ./Configuration
setenv SCRIPT_NAME `basename $0`
setenv LOG ${REPORTLOGSDIR}/${SCRIPT_NAME}.log
rm -f ${LOG}
touch ${LOG}
echo "$0" | tee -a ${LOG}
env | sort | tee -a ${LOG}
#
# Copy the reports to the public FTP site.
#
cd ${REPORTOUTPUTDIR}
echo `date`: Copy reports to ${FTPREPORTDIR} | tee -a ${LOG}
foreach i (*)
if ( ! -d $i ) then
echo `date`: $i | tee -a ${LOG}
cp $i ${FTPREPORTDIR}
endif
end
rm -rf ${FTPREPORTDIR}/iphone*[0-9]*
echo `date`: Copy CvDC files to ${FTPREPORTDIR}/cvdc | tee -a ${LOG}
rm -f ${FTPREPORTDIR}/cvdc/*html
cd ${CVDCDIR}
foreach i (*)
echo `date`: $i | tee -a ${LOG}
cp $i ${FTPREPORTDIR}/cvdc
end
echo "${SCRIPT_NAME} completed successfully" | tee -a ${LOG}
date | tee -a ${LOG}
exit 0