1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00
metasploit-framework/external/installer-linux/minify.sh
Mike Smith 756e6d2ad8 Remove unsupported msfweb interface. (fixes #503)
* This will significantly decrease the size of the msf install (~5 MB)
* ActiveRecord & ActiveSupport are still used, and have been moved to lib/

git-svn-id: file:///home/svn/framework3/trunk@10682 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-14 18:45:16 +00:00

51 lines
994 B
Bash
Executable File

#!/bin/sh
if [ -z "$1" ]; then
echo "Need a directory to minify"
exit 1
fi
MSF_PATH=$1
MINI_PATH=$(dirname "${MSF_PATH}")/msf3-mini
echo $MINI_PATH
# This gets rid of all our .svn files
svn export ${MSF_PATH} ${MINI_PATH}
MINI_EXCLUDES="
HACKING
data/templates/src/
documentation/
external/
lib/msf/ui/gtk2
lib/msf/ui/gtk2.rb
lib/msf/ui/web
lib/msf/ui/web.rb
lib/rex/exploitation/opcodedb.rb
modules/auxiliary/dos/
modules/auxiliary/fuzzers/
msfcli
msfd
msfelfscan
msfgui
msfmachscan
msfopcode
msfpescan
msfrpc
msfrpcd
test
test/
$(find $MINI_PATH -name '*.rb.ut.rb')
"
# If we don't want to blow away the svn files necessary for performing an
# update, we should exclude directories so they don't get re-added when the
# first update happens. This only works with svn client versions >= 1.5.
#for file in ${MINI_EXCLUDES}; do
# if [ -d "${MSF_PATH}/${file}" ]; then
# svn up --set-depth=exclude "${MSF_PATH}/$file"
# fi
#done
cd ${MINI_PATH}
rm -rf ${MINI_EXCLUDES}