commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6442 - trunk/www/utils/sbin


From: reinhard
Subject: r6442 - trunk/www/utils/sbin
Date: Thu, 30 Sep 2004 18:14:24 -0500 (CDT)

Author: reinhard
Date: 2004-09-30 18:14:23 -0500 (Thu, 30 Sep 2004)
New Revision: 6442

Added:
   trunk/www/utils/sbin/update-downloads
Modified:
   trunk/www/utils/sbin/update-tasks
Log:
Automatically generate downloads/current.


Added: trunk/www/utils/sbin/update-downloads
===================================================================
--- trunk/www/utils/sbin/update-downloads       2004-09-30 21:09:07 UTC (rev 
6441)
+++ trunk/www/utils/sbin/update-downloads       2004-09-30 23:14:23 UTC (rev 
6442)
@@ -0,0 +1,23 @@
+#!/bin/bash -e
+
+# This script updates the "downloads/current" directory from the
+# "downloads/releases" directory.
+
+cd /var/www/downloads/current && rm -f *
+
+packages=$(ls ../releases | sed -e 's/-[0-9].*//' | uniq)
+extensions=".tar.gz .zip .deb .rpm .exe -debug.exe"
+
+for p in $packages; do
+  source=""
+  for e in $extensions; do
+    files="$(find ../releases -name "${p}-*${e}")"
+    if test "$files"; then
+      current=$(echo "$files" | sed -e "s/$e\$//" | grep -v "debug" | sort | 
tail --lines=1)
+      test -z "$current" && continue
+      # Do not include packaged files older than corresponding .tar.gz
+      test -z "$source" && source="$current"   # version of source file
+      test "$source" \> "$current" || ln -s $current$e .
+    fi
+  done
+done


Property changes on: trunk/www/utils/sbin/update-downloads
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/www/utils/sbin/update-tasks
===================================================================
--- trunk/www/utils/sbin/update-tasks   2004-09-30 21:09:07 UTC (rev 6441)
+++ trunk/www/utils/sbin/update-tasks   2004-09-30 23:14:23 UTC (rev 6442)
@@ -94,6 +94,10 @@
 cd ${CHECKOUT}/www
 $BASE/bin/gcvs utils/create-website --update --dest /var/www/ --htdig 
/etc/htdig/ --twiki /var/lib/twiki/templates/   2>&1 | sed 's/^/  (*) /g'
 
+# Update the downloads section
+echo "Updating downloads..."
+/usr/local/gnue-sandbox/sbin/update-downloads
+
 #
 # Create docs
 #





reply via email to

[Prev in Thread] Current Thread [Next in Thread]