DevHeads.net

com web/rmtools: fix pecl rss command: bin/pecl_rss.bat bin/pecl_rss_task.bat script/pecl_rss.php

Link: <a href="http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=cbce1434569f85b7fa3c75f3c59cd6385b4b73da" title="http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=cbce1434569f85b7fa3c75f3c59cd6385b4b73da">http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=cbce1434569f85b7fa3...</a>

Log:
fix pecl rss command

Changed paths:
M bin/pecl_rss.bat
M bin/pecl_rss_task.bat
M script/pecl_rss.php

Diff:
diff --git a/bin/pecl_rss.bat b/bin/pecl_rss.bat
index 4d11928..1d897be 100644
--- a/bin/pecl_rss.bat
+++ b/bin/pecl_rss.bat
@@ -1,8 +1,9 @@
@echo off

-SET BAT_DIR=%~dp0
+call %~dp0rmtools_setvars.bat

-set PECL_RSS_CMD=c:\php-sdk\php\php.exe
+set PHP_DIR=%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\bin\php
+set PECL_RSS_CMD=%PHP_DiR%\php.exe -c %PHP_DIR%\php.ini -d extension_dir=%PHP_DIR%\ext

if "%1"=="" goto :help
if "%1"=="--help" goto :help
@@ -11,13 +12,13 @@ if "%1"=="/?" goto :help
goto :skip_help

:help
-%PECL_RSS_CMD% %BAT_DIR%\..\script\pecl_rss.php
+%PECL_RSS_CMD% %PHP_RMTOOLS_SCRIPT_PATH%\script\pecl_rss.php
GOTO EXIT_LOCKED

:skip_help

-%PECL_RSS_CMD% %BAT_DIR%\..\script\pecl_rss.php %*
+%PECL_RSS_CMD% %PHP_RMTOOLS_SCRIPT_PATH%\script\pecl_rss.php %*

:EXIT_LOCKED
echo .
diff --git a/bin/pecl_rss_task.bat b/bin/pecl_rss_task.bat
index 2d88d2d..cd89708 100644
--- a/bin/pecl_rss_task.bat
+++ b/bin/pecl_rss_task.bat
@@ -1,10 +1,8 @@
@echo off

-SET BAT_DIR=%~dp0
+call %~dp0rmtools_setvars.bat

-set LOG_FILE=c:\php-sdk\logs\task-pecl-rss.log

if "%1"=="" goto :help
@@ -20,24 +18,24 @@ echo output of the underlaying worker below. This script will
echo fetch the items from the current RSS feed, download and
echo put them into the build queue.
echo ==========================================================
-call %BAT_DIR%pecl_rss.bat
+call %PHP_RMTOOLS_SCRIPT_PATH%\pecl_rss.bat
GOTO EXIT_LOCKED

:skip_help

-IF EXIST c:\php-sdk\locks\pecl-rss.lock (
+IF EXIST %PHP_RMTOOLS_LOCK_PATH%\pecl-rss.lock (
ECHO Pecl build script is already running.
GOTO EXIT_LOCKED
)

-ECHO running > c:\php-sdk\locks\pecl-rss.lock
+ECHO running > %PHP_RMTOOLS_LOCK_PATH%\pecl-rss.lock

-call %BAT_DIR%pecl_rss.bat %* >> %LOG_FILE% 2<&1
+call %PHP_RMTOOLS_SCRIPT_PATH%\pecl_rss.bat %* >> %LOG_FILE% 2<&1

echo Done.>> %LOG_FILE%

-del c:\php-sdk\locks\pecl-rss.lock >> %LOG_FILE% 2<&1
+del %PHP_RMTOOLS_LOCK_PATH%\pecl-rss.lock >> %LOG_FILE% 2<&1

:EXIT_LOCKED
echo .
diff --git a/script/pecl_rss.php b/script/pecl_rss.php
index baf9d13..12c3728 100644
--- a/script/pecl_rss.php
+++ b/script/pecl_rss.php
@@ -5,7 +5,7 @@ include __DIR__ . '/../include/PeclDb.php';

use rmtools as rm;

-$longopts = array("help", "refresh", "dump-queue", "dump-all", "no-fetch", "force-fetch");
+$longopts = array("help", "refresh", "dump-queue", "dump-all", "no-fetch", "force-fetch", "enable-pre");

$options = getopt(NULL, $longopts);