Skip to content

Commit 02f5fd7

Browse files
committed
Update build cache to run xargs in parallel
1 parent 7b745b2 commit 02f5fd7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/automation/cache/build_new_cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh -ex
22
bundle install
33
rm db/modules_metadata_base.json
4-
git ls-files modules/ -z | xargs -0 -n1 -I{} -- git log -1 --format="%ai {}" {} | while read -r udate utime utz ufile ; do
4+
git ls-files modules/ -z | xargs -0 -n1 -P `nproc` -I{} -- git log -1 --format="%ai {}" {} | while read -r udate utime utz ufile ; do
55
touch -d "$udate $utime" $ufile
66
done
77
./msfconsole -qr tools/automation/cache/wait_for_cache.rc

tools/automation/cache/update_module_cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ IMG='metasploitframework/metasploit-framework:latest'
1717
docker run --rm=true --tty \
1818
--volume=`pwd`:/r7-source \
1919
--workdir=/r7-source ${IMG} \
20-
/bin/sh -c ./tools/automation/cache/build_new_cache.sh
20+
/bin/sh -c 'time ./tools/automation/cache/build_new_cache.sh'

0 commit comments

Comments
 (0)