Added support for using a different quote source
The third parameter can be used to specify a different repository to use as 'base' and pull the client and quote information from.
This commit is contained in:
parent
c470a07458
commit
d51dfadae9
@ -17,7 +17,7 @@
|
|||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
|
||||||
VERSION=0.8
|
VERSION=0.9
|
||||||
SAXON=/usr/local/bin/saxon/saxon9he.jar
|
SAXON=/usr/local/bin/saxon/saxon9he.jar
|
||||||
TEMPLATEREPO=ssh://git@gitlab.local/peter/templates
|
TEMPLATEREPO=ssh://git@gitlab.local/peter/templates
|
||||||
|
|
||||||
@ -33,6 +33,7 @@ pentext=$(echo $PENTEXTREPO|awk -F '/' '{print $5}')
|
|||||||
# Read standard 'command line' variables
|
# Read standard 'command line' variables
|
||||||
[[ ! -z $1 ]] && REPO=$1
|
[[ ! -z $1 ]] && REPO=$1
|
||||||
[[ ! -z $2 ]] && NAMESPACE=$2
|
[[ ! -z $2 ]] && NAMESPACE=$2
|
||||||
|
[[ ! -z $3 ]] && PREVIOUS=$3
|
||||||
BRANCH=master
|
BRANCH=master
|
||||||
TARGET=quote
|
TARGET=quote
|
||||||
|
|
||||||
@ -121,13 +122,13 @@ grab_offer() {
|
|||||||
echo "[-] could not find $TARGET.xml"
|
echo "[-] could not find $TARGET.xml"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
cp client_info.xml $TEMPLOC/client_info.xml
|
cp client_info.xml $TEMPLOC/client_info.xml &> /dev/null
|
||||||
cp $TARGET.xml $TEMPLOC/quote.xml
|
cp $TARGET.xml $TEMPLOC/quote.xml &> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_report() {
|
convert_report() {
|
||||||
cp $TEMPLOC/quote.xml source/quote.xml
|
cp $TEMPLOC/quote.xml source/quote.xml &> /dev/null
|
||||||
cp $TEMPLOC/client_info.xml source/client_info.xml
|
cp $TEMPLOC/client_info.xml source/client_info.xml &> /dev/null
|
||||||
pushd source &>/dev/null
|
pushd source &>/dev/null
|
||||||
java -jar $SAXON -s:quote.xml -xsl:../xslt/off2rep.xsl -o:report.xml
|
java -jar $SAXON -s:quote.xml -xsl:../xslt/off2rep.xsl -o:report.xml
|
||||||
if [ ! -f report.xml ]; then
|
if [ ! -f report.xml ]; then
|
||||||
@ -149,6 +150,7 @@ preflight_checks
|
|||||||
echo "startpentest v${VERSION} - Ready for some ACTION?"
|
echo "startpentest v${VERSION} - Ready for some ACTION?"
|
||||||
ORIGREPO=$REPO
|
ORIGREPO=$REPO
|
||||||
REPO=off-$ORIGREPO
|
REPO=off-$ORIGREPO
|
||||||
|
[[ ! -z $PREVIOUS ]] && $REPO=$PREVIOUS
|
||||||
clone_repo
|
clone_repo
|
||||||
grab_offer
|
grab_offer
|
||||||
REPO=pen-${ORIGREPO}
|
REPO=pen-${ORIGREPO}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user