break the common stuff out into a function
git-svn-id: file:///home/svn/framework3/trunk@9337 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
e5d73387e6
commit
0615dac174
|
@ -11,39 +11,29 @@ else
|
|||
fi
|
||||
(cd tmp; tar cf msf3.tar msf3)
|
||||
|
||||
build_makeself() {
|
||||
NAME=$1
|
||||
INSTALLER_FILENAME=$2
|
||||
BIN_TARBALL_PATH=$3
|
||||
|
||||
TMP=tmp_install_`date +%s1`
|
||||
mkdir ${TMP}/
|
||||
cp tmp/msf3.tar ${TMP}/
|
||||
cp ${BIN_TARBALL_PATH} ${TMP}/metasploit.tar.bz2
|
||||
bunzip2 ${TMP}/metasploit.tar.bz2
|
||||
cp -a scripts/*.sh ${TMP}/
|
||||
cp -a scripts/msfupdate ${TMP}/
|
||||
makeself "${TMP}" "${INSTALLER_FILENAME}" "${NAME}" ./installer.sh
|
||||
rm -rf ${TMP}
|
||||
}
|
||||
|
||||
NAME32="Metasploit Framework v${VERSION} Installer (32-bit)"
|
||||
PATH32="framework-${VERSION}-linux-i686.run"
|
||||
BINPATH32="${BASE}/bin/linux32.tar.bz2"
|
||||
build_makeself "${NAME32}" "${PATH32}" "${BINPATH32}"
|
||||
|
||||
NAME64="Metasploit Framework v${VERSION} Installer (64-bit)"
|
||||
PATH64="framework-${VERSION}-linux-x86_64.run"
|
||||
BINPATH64="${BASE}/bin/linux64.tar.bz2"
|
||||
build_makeself "${NAME64}" "${PATH64}" "${BINPATH64}"
|
||||
|
||||
if [ -f "${BINPATH32}" ]; then
|
||||
rm -rf tmp32
|
||||
mkdir tmp32
|
||||
cp tmp/msf3.tar tmp32/
|
||||
cp ${BINPATH32} tmp32/metasploit.tar.bz2
|
||||
bunzip2 tmp32/metasploit.tar.bz2
|
||||
cp -a scripts/*.sh tmp32/
|
||||
cp -a scripts/msfupdate tmp32/
|
||||
TMP32=tmp32`date +%s1`
|
||||
mv tmp32 $TMP32
|
||||
makeself $TMP32 ${PATH32} "${NAME32}" ./installer.sh 32
|
||||
rm -rf $TMP32
|
||||
fi
|
||||
|
||||
if [ -f "${BINPATH64}" ]; then
|
||||
rm -rf tmp64
|
||||
mkdir tmp64
|
||||
cp tmp/msf3.tar tmp64/
|
||||
cp ${BINPATH64} tmp64/metasploit.tar.bz2
|
||||
bunzip2 tmp64/metasploit.tar.bz2
|
||||
cp -a scripts/*.sh tmp64/
|
||||
cp -a scripts/msfupdate tmp64/
|
||||
TMP64=tmp64`date +%s1`
|
||||
mv tmp64 $TMP64
|
||||
makeself $TMP64 ${PATH64} "${NAME64}" ./installer.sh 64
|
||||
rm -rf $TMP64
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue