Skip to content

Commit

Permalink
saga: handle if there's no saga-refresh.bat (only still used by qgis-…
Browse files Browse the repository at this point in the history
…ltr{,-dev}; fixes #802)
  • Loading branch information
jef-n committed Aug 14, 2023
1 parent a9b4028 commit 0212e7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/saga/osgeo4w/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ if not %OSGEO4W_DESKTOP_LINKS%==0 if not exist "%OSGEO4W_DESKTOP%" mkdir "%OSGEO
if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\\SAGA GIS $V.lnk" "%OSGEO4W_ROOT%\\bin\\bgspawn.exe" "\\"%OSGEO4W_ROOT%\\bin\\saga_gui.bat\\"" "%DOCUMENTS%" "" 1 "%OSGEO4W_ROOT%\\apps\\$P\\saga_gui.exe"
if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%OSGEO4W_DESKTOP%\\SAGA GIS $V.lnk" "%OSGEO4W_ROOT%\\bin\\bgspawn.exe" "\\"%OSGEO4W_ROOT%\\bin\\saga_gui.bat\\"" "%DOCUMENTS%" "" 1 "%OSGEO4W_ROOT%\\apps\\$P\\saga_gui.exe"
for /f "tokens=* usebackq" %%f in (\`dir /s /b "%OSGEO4W_ROOT%\\apps\\saga-refresh.bat"\`) do call "%%f"
dir /s /b "%OSGEO4W_ROOT%\\apps\\saga-refresh.bat" >nul 2>&1
if %errorlevel%==0 for /f "tokens=* usebackq" %%f in (\`dir /s /b "%OSGEO4W_ROOT%\\apps\\saga-refresh.bat" 2^>nul\`) do call "%%f"
EOF

cat <<EOF >install/etc/preremove/$P.bat
Expand All @@ -74,7 +75,8 @@ del "%OSGEO4W_STARTMENU%\\SAGA GIS $V.lnk"
del "%OSGEO4W_DESKTOP%\\SAGA GIS $V.lnk"
del "%OSGEO4W_ROOT%\\apps\\saga\\tools\\dev_tools.dll"
for /f "tokens=* usebackq" %%f in (\`dir /s /b "%OSGEO4W_ROOT%\\apps\\saga-refresh.bat"\`) do call "%%f"
dir /s /b "%OSGEO4W_ROOT%\\apps\\saga-refresh.bat" >nul 2>&1
if %errorlevel%==0 for /f "tokens=* usebackq" %%f in (\`dir /s /b "%OSGEO4W_ROOT%\\apps\\saga-refresh.bat" 2^>nul\`) do call "%%f"
EOF

export R=$OSGEO4W_REP/x86_64/release/$P
Expand Down

0 comments on commit 0212e7d

Please sign in to comment.