cvs: php-master-web /scripts update-backend
| From: | Jim Winstead | Date: | Sat, 22 Sep 2001 00:25:58 +0000 |
| Subject: | cvs: php-master-web /scripts update-backend | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-6565@lists.php.net to get a copy of this message | ||
jimw Fri Sep 21 20:25:58 2001 EDT
Modified files:
/php-master-web/scripts update-backend
Log:
have to pass directory via command line
Index: php-master-web/scripts/update-backend
diff -u php-master-web/scripts/update-backend:1.1 php-master-web/scripts/update-backend:1.2
--- php-master-web/scripts/update-backend:1.1 Fri Sep 21 16:17:03 2001
+++ php-master-web/scripts/update-backend Fri Sep 21 20:25:58 2001
@@ -5,13 +5,17 @@
if (!$token) die("you have to set the TOKEN environment variable");
$token = rawurlencode($token);
+if (!$argv[1]) die("usage: $argv[0] directory\n");
+
+$root = $argv[1];
+
/* get mirrors list */
fetch_into_file("http://master.php.net/fetch/mirrors.php?token=$token",
- "include/mirrors.inc");
+ "$root/include/mirrors.inc");
/* get upcoming events */
fetch_into_file("http://master.php.net/fetch/events.php?nm=3&token=$token",
- "backend/events.csv");
+ "$root/backend/events.csv");
function fetch_into_file($url,$file) {
$source = fopen($url,"r");