19 lines
482 B
Bash
Executable File
19 lines
482 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "usage: $0 <archive-file-or-dir> [output-list]" >&2
|
|
exit 2
|
|
fi
|
|
|
|
archive_path=$1
|
|
output=${2:-traffic-resources.txt}
|
|
container=${CP77_TOOLBOX_CONTAINER:-2077}
|
|
tool='${HOME}/.dotnet/tools/cp77tools'
|
|
|
|
toolbox run --container "${container}" bash -lc \
|
|
"${tool} archive --list --regex 'traffic.*persistent|persistent.*traffic|traffic.*lane|world.*traffic' '$archive_path'" \
|
|
> "${output}"
|
|
|
|
echo "wrote ${output}"
|