Update build cache to run xargs in parallel

This commit is contained in:
adfoster-r7
2024-10-30 18:27:07 +00:00
parent 7b745b2dcb
commit 02f5fd77be
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/sh -ex
bundle install
rm db/modules_metadata_base.json
git ls-files modules/ -z | xargs -0 -n1 -I{} -- git log -1 --format="%ai {}" {} | while read -r udate utime utz ufile ; do
git ls-files modules/ -z | xargs -0 -n1 -P `nproc` -I{} -- git log -1 --format="%ai {}" {} | while read -r udate utime utz ufile ; do
touch -d "$udate $utime" $ufile
done
./msfconsole -qr tools/automation/cache/wait_for_cache.rc
+1 -1
View File
@@ -17,4 +17,4 @@ IMG='metasploitframework/metasploit-framework:latest'
docker run --rm=true --tty \
--volume=`pwd`:/r7-source \
--workdir=/r7-source ${IMG} \
/bin/sh -c ./tools/automation/cache/build_new_cache.sh
/bin/sh -c 'time ./tools/automation/cache/build_new_cache.sh'