Files
metasploit-gs/tools/automation/cache/build_new_cache.sh
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
510 B
Bash
Raw Normal View History

#!/bin/sh -ex
2021-03-08 17:33:32 -06:00
bundle install
rm db/modules_metadata_base.json
2024-10-30 18:27:07 +00:00
git ls-files modules/ -z | xargs -0 -n1 -P `nproc` -I{} -- git log -1 --format="%ai {}" {} | while read -r udate utime utz ufile ; do
2021-03-08 17:33:32 -06:00
touch -d "$udate $utime" $ufile
done
./msfconsole -qr tools/automation/cache/wait_for_cache.rc
2021-03-08 17:33:32 -06:00
cp ~/.msf4/store/modules_metadata.json db/modules_metadata_base.json
cp ~/.msf4/logs/framework.log .
2022-04-19 19:28:40 -05:00
set +e
git diff --exit-code db/modules_metadata_base.json
if [ ! $? ]; then
2021-03-08 17:33:32 -06:00
echo "Module cache updates exist."
fi