Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Oct 5, 2024
1 parent 42aaa80 commit 347caa5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/tile-smush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ int main(const int argc, const char* argv[]) {
}

if (filenames.empty()) {
std::cerr << "usage: ./tile-smush file1.mbtiles file2.mbtiles [...]" << std::endl;
if (shard == 0)
std::cerr << "usage: ./tile-smush file1.mbtiles file2.mbtiles [...]" << std::endl;
return 1;
}

Expand Down
4 changes: 3 additions & 1 deletion tile-smush-parallel
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ kill_children() {

trap kill_children INT

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

export SHARDS=16
for i in $(seq 0 $((SHARDS - 1))); do
SHARD=$i ./tile-smush "$@" &
SHARD=$i "${SCRIPT_DIR}"/tile-smush "$@" &
pids[${i}]=$!
done

Expand Down

0 comments on commit 347caa5

Please sign in to comment.