mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-12 23:43:44 +08:00
1ce9f73ae2
Add navigation and map matching providers with the vendored map service sources.
22 lines
455 B
Bash
Executable File
22 lines
455 B
Bash
Executable File
#!/bin/bash
|
|
|
|
threads=16
|
|
counter=0
|
|
touch ch
|
|
while IFS= read -r line;
|
|
do
|
|
if [ "$counter" -lt "$threads" ]; then
|
|
{ tar -czvf "${line}.tar.gz" "$line"; echo 'done' > ch; } &
|
|
let $[counter++];
|
|
else
|
|
read -r x < ch # waiting for a process to finish
|
|
{ tar -czvf "${line}.tar.gz" "$line"; echo 'done' > ch; } &
|
|
fi
|
|
done < <(find offline/*/* -type d)
|
|
|
|
wait # wait for remaining background processes
|
|
|
|
rm -f ch
|
|
|
|
echo 'finished compressing files'
|