Changeset 2277 for scripts/watch.sh
- Timestamp:
- 10/22/07 10:06:26 (6 years ago)
- File:
-
- 1 edited
-
scripts/watch.sh (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/watch.sh
r2172 r2277 3 3 # Coyright 2007 Alan Baghumian / GNU/GPL 4 4 # 5 # Requires: lynx 5 # Updated: 2007-10-22 10:18 +330 GMT 6 # 7 # Requires: lynx, devscripts 6 8 7 9 BASE_PATH="/home/parsix/public_html/watch" 8 10 BASE_URL="http://watch.parsix.org" 11 BUILDD="http://buildd.parsix.org" 12 LOGS_PATH="/home/parsix/public_html/buildlogs" 9 13 LOCAL_REPO="/home/parsix/public_html/packages/pool" 10 14 SVN_REPO="/svn/pkg-parsix/" 15 UNDERLINE=$'\137' # 137 is octal ASCII code for '_' 11 16 12 17 if [ -f $BASE_PATH/index.html ]; then … … 14 19 fi 15 20 16 HEADER="<html lang='en-us'><head><title>Parsix GNU/Linux :: Package Watch System</title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><link rel='icon' href='http://www.parsix.org/html/themes/parsix/images/icon.png' type='image/png'><link rel='shortcut icon' href='http://www.parsix.org/html/themes/parsix/images/favicon.ico'><link rel='stylesheet' href='http://www.parsix.org/html/modules/Admin/pnstyle/admin.css' type='text/css'><link rel='stylesheet' href='http://www.parsix.org/html/themes/parsix/style/styleNN.css' type='text/css'><style type='text/css'>@import url('http://www.parsix.org/html/themes/parsix/style/style.css');</style></head><body bgcolor='#deba73' text='#000000' link='#363636' vlink='#363636' alink='#d5ae83'><CENTER><H2>Parsix GNU/Linux Package Watch System</H2></CENTER><table border=1 align=center width=80% bgcolor=#f7f0e0><tr><td><b>Package Name</b></td><td><b>Upstream Version</b></td><td><b>Parsix Version</b></td><td><b>Supported Archs</b></td><td><b>Status</b></td><t r>"21 HEADER="<html lang='en-us'><head><title>Parsix GNU/Linux :: Package Watch System</title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><link rel='icon' href='http://www.parsix.org/html/themes/parsix/images/icon.png' type='image/png'><link rel='shortcut icon' href='http://www.parsix.org/html/themes/parsix/images/favicon.ico'><link rel='stylesheet' href='http://www.parsix.org/html/modules/Admin/pnstyle/admin.css' type='text/css'><link rel='stylesheet' href='http://www.parsix.org/html/themes/parsix/style/styleNN.css' type='text/css'><style type='text/css'>@import url('http://www.parsix.org/html/themes/parsix/style/style.css');</style></head><body bgcolor='#deba73' text='#000000' link='#363636' vlink='#363636' alink='#d5ae83'><CENTER><H2>Parsix GNU/Linux Package Watch System</H2></CENTER><table border=1 align=center width=80% bgcolor=#f7f0e0><tr><td><b>Package Name</b></td><td><b>Upstream Version</b></td><td><b>Parsix Version</b></td><td><b>Supported Archs</b></td><td><b>Status</b></td><td><b>Build Server Status</b></td><tr>" 17 22 18 23 FOOTER="</body></html>" … … 20 25 echo $HEADER > $BASE_PATH/index.html 21 26 22 LIST=` /usr/bin/find $SVN_REPO -name watch | /bin/grep debian | /bin/grep trunk | sort -u`27 LIST=`find $SVN_REPO -name watch | grep debian | grep trunk | sort -u` 23 28 24 29 for x in $LIST … … 26 31 27 32 # ARCH Checks 28 PKG=`/usr/bin/basename ${x/%trunk\/debian\/watch/}` 29 PATH=`/usr/bin/find $LOCAL_REPO -type d | /bin/grep $PKG` 30 COUNT=`/usr/bin/find $PATH | /bin/grep -c amd64.deb` 33 PKG=`basename ${x/%trunk\/debian\/watch/}` 34 LORPATH=`find $LOCAL_REPO -type d | grep $PKG` 35 cd $SVN_REPO/pkg/ 36 COMPONENT=`find ./ -maxdepth 2 -type d | grep /$PKG$ | awk 'BEGIN{FS="/"}{print $2}'` 37 if [ -d $COMPONENT/$PKG ]; then 38 cd $COMPONENT/$PKG 39 PKG_VERSION=`dpkg-parsechangelog -ltrunk/debian/changelog | grep Version | awk 'BEGIN{FS=": "}{print $2}' | awk 'BEGIN{FS="-"}{print $1}' | awk 'BEGIN{FS=" "}{print $1}'` 40 PKG_REVISION=`dpkg-parsechangelog -ltrunk/debian/changelog | grep Version | awk 'BEGIN{FS=": "}{print $2}' | awk 'BEGIN{FS="-"}{print $2}'` 41 cd 42 fi 43 44 COUNT=`find $LORPATH | grep -c amd64.deb` 31 45 if [ $COUNT -ne 0 ]; then 32 46 AMD64="amd64" … … 35 49 fi 36 50 37 COUNT=` /usr/bin/find $PATH | /bin/grep -c i386.deb`51 COUNT=`find $LORPATH | grep -c i386.deb` 38 52 if [ $COUNT -ne 0 ]; then 39 53 I386="i386" … … 42 56 fi 43 57 44 COUNT=` /usr/bin/find $PATH | /bin/grep -c all.deb`58 COUNT=`find $LORPATH | grep -c all.deb` 45 59 if [ $COUNT -ne 0 ]; then 46 60 ALLARCH="all" … … 53 67 54 68 # work around the plus bug 55 x=`echo $x | /bin/sed s/+/KKK/g`69 x=`echo $x | sed s/+/KKK/g` 56 70 57 71 if [ ! -z "$FAKEARCHS" ]; then 58 /usr/bin/lynx -source $BASE_URL/watch.php?vars=${x/%debian\/watch/}*$ARCHS*$PKG | /bin/sed s/Debian/Parsix/g >> $BASE_PATH/index.html 72 lynx -source $BASE_URL/watch.php?vars=${x/%debian\/watch/}*$ARCHS*$PKG | sed s/Debian/Parsix/g >> $BASE_PATH/index.html 73 fi 74 75 if [ -f $LOGS_PATH/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log ]; then 76 echo "log exists..." 77 BUILD_STATUS=`tail -1 $LOGS_PATH/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log` 78 if [ "$BUILD_STATUS" = "Build OK" ]; then 79 echo "<td bgcolor='00d7e9'><a href=$BUILDD/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log><b>OK</b></a></td></tr>" >> $BASE_PATH/index.html 80 elif [ "$BUILD_STATUS" = "Build failed" ]; then 81 echo "<td bgcolor='#ff9199'><a href=$BUILDD/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log><b>Failed</b></a></td></tr>" >> $BASE_PATH/index.html 82 else 83 echo "<td bgcolor='#ffff00'><a href=$BUILDD/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log>N/A</a></td></tr>" >> $BASE_PATH/index.html 84 fi 85 else 86 echo "<td bgcolor='#ffff00'>N/A</td></tr>" >> $BASE_PATH/index.html 59 87 fi 60 88 61 89 done 62 90 63 echo "<p align=center>Last Update: ` /bin/date`</p>" >> $BASE_PATH/index.html91 echo "<p align=center>Last Update: `date`</p>" >> $BASE_PATH/index.html 64 92 65 93 echo $FOOTER >> $BASE_PATH/index.html
Note: See TracChangeset
for help on using the changeset viewer.


