Skip to content

Commit

Permalink
#44 #32 - adjustment for windows cli helper and baseline option
Browse files Browse the repository at this point in the history
- define php path for windows cli helper and output carriage return +
line feed for generated tagui_helper.cmd

- baseline option set flow file name variable correctly
  • Loading branch information
kensoh committed Aug 10, 2017
1 parent bb91fda commit fdb40c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/erina.cmd 100755 → 100644
Expand Up @@ -14,6 +14,7 @@ rem delete helper file if it exists to prevent running an old call
if exist "tagui_helper.cmd" del "tagui_helper.cmd"

rem call php helper to interpret parameters passed in to cli helper
if exist "%~dp0php\php.exe" set "path=%~dp0php;%path%"
php -q tagui_helper.php %1 %2 %3 %4 %5 %6 %7 %8 %9

rem run generated output from php helper to call automation flow
Expand Down
6 changes: 3 additions & 3 deletions src/tagui.cmd
Expand Up @@ -110,10 +110,10 @@ if %tagui_baseline_mode%==false (
if "%flow_file%"=="" set "flow_file=%~dpnx1"
) else (
if "%flow_file%"=="" set "flow_file=%~dpnx1"
for %%i in ("%flow_file%") do set "flow_folder=%%~dpi"
for %%i in ("%flow_file%") do set "flow_filename=%%~nxi"
for %%i in ("!flow_file!") do set "flow_folder=%%~dpi"
for %%i in ("!flow_file!") do set "flow_filename=%%~nxi"
if not exist "!flow_folder!baseline" mkdir "!flow_folder!baseline"
copy "%flow_file%" "!flow_folder!baseline\." > nul
copy "!flow_file!" "!flow_folder!baseline\." > nul
set "flow_file=!flow_folder!baseline\!flow_filename!"
)

Expand Down
6 changes: 3 additions & 3 deletions src/tagui_helper.php
Expand Up @@ -72,9 +72,9 @@
fwrite($output_file,"./tagui " . $helper_flow_filename . " quiet " . $helper_flow_options . "\n");
fclose($output_file); chmod ('tagui_helper',0700);
$output_file = fopen('tagui_helper.cmd','w') or die("cannot open tagui_helper.cmd, raise an issue on TagUI GitHub page" . "\n");
fwrite($output_file,"@echo off" . "\n");
fwrite($output_file,"rem # GENERATED HELPER ASSISTANT SCRIPT FOR RUNNING TAGUI FRAMEWORK ~ TEBEL.ORG #" . "\n");
fwrite($output_file,"tagui " . $helper_flow_filename . " quiet " . $helper_flow_options . "\n");
fwrite($output_file,"@echo off" . "\r\n");
fwrite($output_file,"rem # GENERATED HELPER ASSISTANT SCRIPT FOR RUNNING TAGUI FRAMEWORK ~ TEBEL.ORG #" . "\r\n");
fwrite($output_file,"tagui " . $helper_flow_filename . " quiet " . $helper_flow_options . "\r\n");
fclose($output_file); chmod ('tagui_helper.cmd',0700);

?>

0 comments on commit fdb40c8

Please sign in to comment.