CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/tools/automation/cache/build_new_cache.sh
Views: 11623
1
#!/bin/sh -ex
2
bundle install
3
rm 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 -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