clean:
rm -rf bin/
@echo Removing sources taken from libs...
- @for lib in libs/*.jar; do \
+ @for lib in libs/*-sources.jar; do \
basename "$$lib"; \
jar tf "$$lib" | while read -r ln; do \
[ -f "src/$$ln" ] && rm "src/$$ln"; \
libs: bin
@[ -e bin/libs -o ! -d libs ] || echo Extracting sources from libs...
- @[ -e bin/libs -o ! -d libs ] || (cd src&& for lib in ../libs/*.jar;do \
+ @[ -e bin/libs -o ! -d libs ] || (cd src && for lib in ../libs/*-sources.jar; do \
basename "$$lib"; \
jar xf "$$lib"; \
done )
@echo "Main-Class: `echo "$(MAIN)" | sed 's:/:.:g'`" > bin/manifest
@echo >> bin/manifest
$(JAR) cfm $(NAME).jar bin/manifest $(JAR_FLAGS)
+ @[ ! -e VERSION ] || echo Copying to "$(NAME)-`cat VERSION`.jar"
+ @[ ! -e VERSION ] || cp $(NAME).jar "$(NAME)-`cat VERSION`.jar"
run:
@[ -e bin/$(MAIN).class ] || echo You need to build the sources
echo "MAIN = be/nikiroo/fanfix/Main" > Makefile
echo "NAME = fanfix" >> Makefile
echo "PREFIX = $PREFIX" >> Makefile
-echo "JAR_FLAGS += -C bin/ org -C bin/ be" >> Makefile
+echo "JAR_FLAGS += -C bin/ org -C bin/ be -C ./ src" >> Makefile
cat Makefile.base >> Makefile
&& !path.endsWith(format)) {
MetaData meta = itSupport.processMeta(
file.toURI().toURL()).getMeta();
- stories.put(meta, file);
-
- try {
- int id = Integer.parseInt(meta.getLuid());
- if (id > lastId) {
- lastId = id;
+ if (meta != null) {
+ stories.put(meta, file);
+ try {
+ int id = Integer.parseInt(meta
+ .getLuid());
+ if (id > lastId) {
+ lastId = id;
+ }
+ } catch (Exception e) {
+ // not normal!!
+ Instance.syserr(new IOException(
+ "Cannot understand the LUID of "
+ + file.getPath() + ": "
+ + meta.getLuid(), e));
}
- } catch (Exception e) {
+ } else {
// not normal!!
Instance.syserr(new IOException(
- "Cannot read the LUID of: "
- + file.getPath(), e));
+ "Cannot get metadata for: "
+ + file.getPath()));
}
}
} catch (IOException e) {
@Override
public String getSourceName() {
- return "MangaFox.met";
+ return "MangaFox.me";
}
@Override