diff options
author | lassulus <lassulus@lassul.us> | 2021-08-31 19:16:11 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-08-31 19:16:11 +0200 |
commit | 8104c7412081d8ae3e372cf160bf3c6109a6a4e7 (patch) | |
tree | ac4c74514a8fbdcb682f1f1e22ebdf3376c0e1fd /makefu/5pkgs/beef/update.sh | |
parent | f1fd0f15cd506cd263e43d94c6bcf933b693d0a2 (diff) | |
parent | 6e9910aa65b63d7bda3434c8089f6904adb8e45c (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/5pkgs/beef/update.sh')
-rwxr-xr-x | makefu/5pkgs/beef/update.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/makefu/5pkgs/beef/update.sh b/makefu/5pkgs/beef/update.sh new file mode 100755 index 000000000..cce635f6d --- /dev/null +++ b/makefu/5pkgs/beef/update.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl bundix git libiconv libpcap libxml2 libxslt pkg-config postgresql ruby.devEnv sqlite xmlstarlet nix-update wget + +set -eu -o pipefail +cd "$(dirname "$(readlink -f "$0")")" + + +# TODO find the correct tag +echo Fetching latest Gemfile +wget https://raw.githubusercontent.com/beefproject/beef/master/Gemfile -O Gemfile +rm -f Gemfile.lock +echo Running bundler install +bundler install +echo Running bundix +bundix +exit 0 + +latest=$(curl https://github.com/rapid7/metasploit-framework/releases.atom | xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v atom:title -n | head -n1) +echo "Updating metasploit to $latest" + +sed -i "s#refs/tags/.*#refs/tags/$latest\"#" Gemfile + +bundler install +bundix +sed -i '/[ ]*dependencies =/d' gemset.nix + +cd "../../../../" +nix-update beef --version "$latest" |