Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/tools/automation/cache/build_new_cache.sh
24699 views
1
#!/bin/sh -ex
2
bundle install
3
rm -f db/modules_metadata_base.json
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
5
touch -d "$udate $utime" $ufile
6
done
7
./msfconsole --no-defer-module-loads -qr tools/automation/cache/wait_for_cache.rc
8
cp ~/.msf4/store/modules_metadata.json db/modules_metadata_base.json
9
cp ~/.msf4/logs/framework.log .
10
set +e
11
git diff --exit-code db/modules_metadata_base.json
12
if [ ! $? ]; then
13
echo "Module cache updates exist."
14
fi
15
16