Opened 14 years ago

Closed 14 years ago

#7207 closed enhancement (fixed)

mirror pci.ids on www.haiku-files.org

Reported by: mmadia Owned by: mmadia
Priority: normal Milestone: R1
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

http://pciids.sourceforge.net/pci.ids could be downloaded via cron on the server.

Change History (2)

comment:1 by mmadia, 14 years ago

Fixed in hrev40460.

Here's the script, which www.haiku-files.org will run every day. It's stored in the home directory of that DreamHost account as mirror-pci.ids.sh

#!/bin/sh
# License: MIT
# Author(s):
#	mmadia
#
# This is a simple cron script for downloading pci.ids
# from the PCI ID Repository, http://pciids.sourceforge.net
# In turn, Haiku's build system will download this mirrored copy.

url=http://pciids.sourceforge.net/pci.ids
destdir=/home/haiku_files/haiku-files.org/files
destname=pci.ids

cd /home/haiku_files/
wget -nv $url
retcode=$?
if [ $retcode -eq 0 ] ; then
	mv pci.ids "$destdir/$destname"
	retcode=$?
	if [ $retcode -eq 0 ] ; then
		echo "Failed: Moving downloaded pci.ids to $destdir/$destname"
	fi
else
	echo "Failed: Downloading $url"
	if [ -e pci.ids ] ; then
		rm pci.ids
	fi
fi

comment:2 by mmadia, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.