Files
metasploit-gs/external/installer-linux/minify.sh
T
James Lee ab0d2c365e nuke the gtk and web UIs for the mini installer
git-svn-id: file:///home/svn/framework3/trunk@9866 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-19 20:28:23 +00:00

52 lines
1001 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
msfweb
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}