Subversion Repositories DevTools

Rev

Rev 3410 | Rev 3423 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3410 Rev 3413
Line 2... Line 2...
2
#set -x
2
#set -x
3
#
3
#
4
#   Config
4
#   Config
5
#
5
#
6
MAILTO=David.Purdie@vixtechnology.com,John.Rowling@vixtechnology.com
6
MAILTO=David.Purdie@vixtechnology.com,John.Rowling@vixtechnology.com
-
 
7
FROM=buildadm@vixtechnology.com
7
CCTO=
8
CCTO=
8
PATH=$HOME/bin:$PATH
9
PATH=$HOME/bin:$PATH
9
DPKG=/export/devl/dpkg_archive
10
DPKG=/export/devl/dpkg_archive
10
RELEASES=/export/devl/releases
11
RELEASES=/export/devl/releases
11
BASEDIR=$DPKG
12
BASEDIR=$DPKG
Line 104... Line 105...
104
fi
105
fi
105
 
106
 
106
 
107
 
107
LFILE=$OUTDIR/dpkg_archive_list.$DATE.txt
108
LFILE=$OUTDIR/dpkg_archive_list.$DATE.txt
108
LLFILE=$METADIR/dpkg_archive_list.$DATE.txt
109
LLFILE=$METADIR/dpkg_archive_list.$DATE.txt
109
L2FILE=$METADIR/dpkg_archive_list.$DATE.txt
110
L2FILE=dpkg_archive_list.$DATE.txt
110
CFILE=$BASEDIR/dpkg_archive_list.txt
111
CFILE=$BASEDIR/dpkg_archive_list.txt
111
C2FILE=$OUTDIR/dpkg_archive_list.txt
112
C2FILE=$OUTDIR/dpkg_archive_list.txt
112
 
113
 
113
PFILE=$OUTDIR/dpkg_archive_pkg.$DATE.txt
114
PFILE=$OUTDIR/dpkg_archive_pkg.$DATE.txt
114
YFILE=$OUTDIR/dpkg_archive_pkg.$YDATE.txt
115
YFILE=$OUTDIR/dpkg_archive_pkg.$YDATE.txt
Line 127... Line 128...
127
if [ "$DO_FIND" ] ; then
128
if [ "$DO_FIND" ] ; then
128
    [ $DO_VERBOSE ] && echo "Finding all packages in the archive"
129
    [ $DO_VERBOSE ] && echo "Finding all packages in the archive"
129
    #
130
    #
130
    # Determine packages in archive
131
    # Determine packages in archive
131
    #
132
    #
132
    $GFIND -L $BASEDIR -mindepth=2 -maxdepth 2 -type d  > $PFILE
133
    $GFIND -L $BASEDIR -maxdepth 2 -type d  > $PFILE
133
 
134
 
134
    #
135
    #
135
    #   Determine files in the archive
136
    #   Determine files in the archive
136
    #   Keep a link to simplify user access to the list
137
    #   Keep a link to simplify user access to the list
137
    #
138
    #
Line 153... Line 154...
153
 
154
 
154
f1=/tmp/$$.file1
155
f1=/tmp/$$.file1
155
f2=/tmp/$$.file2
156
f2=/tmp/$$.file2
156
f3=/tmp/$$.file3
157
f3=/tmp/$$.file3
157
 
158
 
-
 
159
echo >> $f3 '<pre style="font-size: medium">'
158
echo >> $f3 "dpkg_archive Report"
160
echo >> $f3 "dpkg_archive Report"
159
echo >> $f3 "Yesterday:  $YFILE"
161
echo >> $f3 "Yesterday:  $YFILE"
160
echo >> $f3 "Today    :  $PFILE"
162
echo >> $f3 "Today    :  $PFILE"
161
echo >> $f3 ""
163
echo >> $f3 ""
162
$GDF -h $MOUNTS >> $f3
164
$GDF -h $MOUNTS >> $f3
Line 180... Line 182...
180
 
182
 
181
            pname="${file##$BASEDIR/}"
183
            pname="${file##$BASEDIR/}"
182
            pver="${pname##*/}"
184
            pver="${pname##*/}"
183
            pname="${pname%%/*}"
185
            pname="${pname%%/*}"
184
 
186
 
-
 
187
            if [ "$pname" = ".dpkg_archive" ] ; then
-
 
188
                continue
-
 
189
            fi
-
 
190
 
185
            if [ "$pname" = "$pver" ] ; then
191
            if [ "$pname" = "$pver" ] ; then
186
                printf " D%10s %8s %10s %s\n" "-" "NewDir" "-" $file
192
                printf " D%10s %8s %10s %s\n" "-" "NewDir" "-" $file
187
                continue
193
                continue
188
            fi
194
            fi
189
 
195
 
Line 275... Line 281...
275
        echo "" >> $f3
281
        echo "" >> $f3
276
        echo "Releases Link Report" >> $f3
282
        echo "Releases Link Report" >> $f3
277
        scan_release.pl $RELEASES >> $f3
283
        scan_release.pl $RELEASES >> $f3
278
 
284
 
279
    fi
285
    fi
-
 
286
echo >> $f3 "</pre>"
280
 
287
 
281
 
288
 
282
 
289
 
283
    #
290
    #
284
    #   Mail results
291
    #   Mail results
285
    #
292
    #
286
    if [ "$DO_MAIL" ] ; then
293
    if [ "$DO_MAIL" ] ; then
287
        [ $DO_VERBOSE ] && echo "Mailing Results"
294
        [ $DO_VERBOSE ] && echo "Mailing Results"
288
        echo "Mailing results"
295
        echo "Mailing results"
-
 
296
        sendEmail.pl -q -f ${FROM} -t ${MAILTO} ${CCTO} -u "[dpkg_archive] $DATE Archive Report from $HOSTNAME" '-o' 'message-content-type=html' -o "message-file=$f3"
289
        (
297
#        (
290
            cat $f3
298
#            cat $f3
291
        ) | mail_files.ksh -t ${MAILTO} ${CCTO} -s "[dpkg_archive] $DATE Archive Report from $HOSTNAME" #-b $f3
299
#        ) | mail_files.ksh -t ${MAILTO} ${CCTO} -s "[dpkg_archive] $DATE Archive Report from $HOSTNAME" #-b $f3
292
    else
300
    else
293
        cat $f3
301
        cat $f3
294
    fi
302
    fi
295
 
303
 
296
else
304
else