bndtools / bundle-hub

Repository from Github https://github.combndtools/bundle-hubRepository from Github https://github.combndtools/bundle-hub

Create Make bat file for Windows platform

tangyong opened this issue · comments

Currently Make file applies for Mac and Linux, For windows platform, I do a patch as following:

@echo off
setlocal enabledelayedexpansion
SET INDEXER=org.osgi.impl.bundle.repoindex.cli/org.osgi.impl.bundle.repoindex.cli-0.0.6.jar
SET REPONAME=BundleHub
SET SCANNED_JARS=
for /r %%i in (*.jar) do (
if "!SCANNED_JARS!" == "" (
set SCANNED_JARS=%%i
) else (
set SCANNED_JARS=!SCANNED_JARS! %%i
)
)

java -jar %INDEXER% -n %REPONAME% %SCANNED_JARS%

please evaluate the above patch.
BTW: the batch runs fine on my local env.

Thanks.

Dong an improvement for sorting listed jar files as following:

@echo off
setlocal enabledelayedexpansion
SET INDEXER=org.osgi.impl.bundle.repoindex.cli/org.osgi.impl.bundle.repoindex.cli-0.0.6.jar
SET REPONAME=BundleHub
SET SCANNED_JARS=
for /f %%i in ('dir *.jar /a-d /s /b ^| sort') do (
if "!SCANNED_JARS!" == "" (
set SCANNED_JARS=%%i
) else (
set SCANNED_JARS=!SCANNED_JARS! %%i
)
)

java -jar %INDEXER% -n %REPONAME% %SCANNED_JARS%

please evaluate the above.
Thanks

We already have a make file. Just install make on windows to run it if needed. I don't think we want to have 2 files to do this: a makefile and a bat file.

@bjhargrave Sure, I agree with you. I will close the issue.