source: branches/irods-mockup/tools/GaussView/qcg-submit.bat @ 117

Revision 117, 1.5 KB checked in by pkopta, 12 years ago (diff)

AWK for Windows, scripts and installer for GaussView?/QCG-Icon integration

  • Property svn:executable set to *
Line 
1@echo off
2
3rem SETLOCAL ENABLEEXTENSIONS
4rem SETLOCAL DISABLEDELAYEDEXPANSION
5
6set base_dir=%~dps0
7
8set input_file=%1
9set output_file=%2
10
11rem echo %input_file%
12
13set awk_cmd=%base_dir%\awk.exe
14rem echo "executing" %awk_cmd% -f %base_dir%\get_chk.awk %input_file%
15
16rem set awk_cal1=%awk_cmd% -f %base_dir%\get_chk.awk %input_file%
17rem %awk_cmd% -f %base_dir%\get_chk.awk %input_file% > awk_result
18
19for /f "tokens=*" %%i in ('%awk_cmd% -f %base_dir%\get_chk.awk %input_file%') do set chk_full_path=%%i
20for %%X in (%chk_full_path%) do set chk_path=%%~dpsX
21for %%X in (%chk_full_path%) do set chk_fname=%%~nxX
22for %%X in (%input_file%) do set input_fname=%%~nxX
23for %%X in (%output_file%) do set output_fname=%%~nxX
24rem echo "checkpoint path" %chk_full_path%
25rem echo %chk_fname%
26rem echo %chk_path%
27
28set tmp_dir=%TEMP%\gauss-wd-%RANDOM%
29mkdir %tmp_dir%
30
31set temp_input_file=%tmp_dir%\%input_fname%
32rem echo "temp_input_file" %temp_input_file%
33
34%awk_cmd% -f "%base_dir%\remove_chk.awk" %input_file% > %temp_input_file%
35
36rem echo start "QCG-Icon launcher" /min /wait "C:\Program Files\qcg-icon\qcg-submit.exe" -s -w %tmp_dir% -o %tmp_dir%\%output_fname% %temp_input_file% > %tmp_dir%/cmd
37start "QCG-Icon launcher" /MIN /WAIT "#QCG_ICON_PATH#" -s -w "%tmp_dir%" -o "%tmp_dir%\%output_fname%" "%temp_input_file%"
38rem echo "coping" %tmp_dir%\%chk_fname% "%chk_full_path%"
39copy %tmp_dir%\%chk_fname% "%chk_full_path%"
40rem echo "coping" %tmp_dir%\%output_fname% %output_file%
41copy %tmp_dir%\%output_fname% %output_file%
42
43rmdir %tmp_dir% /S /Q
Note: See TracBrowser for help on using the repository browser.