diff --git a/Makefile b/Makefile index a439e0dcd..c3c89b6f1 100644 --- a/Makefile +++ b/Makefile @@ -159,9 +159,9 @@ index: preconditions md asmfx asmprelaunch compress # in the form of OKVS data structures, plus game counts in the form of source files # [ -f build/index ] || $(PARALLEL) ::: \ - '(grep "^00" < build/GAMES.CONF | bin/buildsearch.sh src/index/count00.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG > build/SEARCH00.IDX)' \ + '(grep "^00" < build/GAMES.CONF | bin/buildsearch.sh src/index/count00.a build/HGR.TITLES.LOG /dev/null > build/SEARCH00.IDX)' \ '(grep "^0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count01.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG > build/SEARCH01.IDX)' \ - '(grep "^.0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count10.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG > build/SEARCH10.IDX)' \ + '(grep "^.0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count10.a build/HGR.TITLES.LOG /dev/null > build/SEARCH10.IDX)' \ '(bin/buildsearch.sh src/index/count11.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG < build/GAMES.CONF > build/SEARCH11.IDX)' # # add IDX files to the combined index file and generate diff --git a/bin/buildsearch.sh b/bin/buildsearch.sh index ad42454f7..27a47d579 100755 --- a/bin/buildsearch.sh +++ b/bin/buildsearch.sh @@ -32,7 +32,11 @@ source=$(mktemp) count=0 while IFS="=" read -r key value; do count=$((count+1)) - dhgr=$(echo "$key" | cut -c3) # 'has DHGR title screen' flag (0 or 1) + if [ -z "$dhgrlog" ]; then + dhgr="0" + else + dhgr=$(echo "$key" | cut -c3) # 'has DHGR title screen' flag (0 or 1) + fi cheat=$(echo "$key" | cut -c4) # 'cheat category' (0..5) key=$(echo "$key" | cut -d"," -f2) if [ "$dhgr" -eq "0" ]; then