Commit c84229c3 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Little hack to prevent Umbrello from overwriting the original XMI file.

parent ac80bee0
......@@ -26,19 +26,25 @@ else
set XMIFILE=$1
endif
endif
set TMPDIR=`mktemp /tmp/gencastor-XXXXXX`
set TMPDIR=`mktemp /tmp/gencastor-XXXXXX`
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}/${TOPNS}/db
cp ${WORKDIR}/${TOPNS}/db/*.sql ${TMPDIR}/${TOPNS}/db/
grep 'CREATE OR REPLACE' ${TMPDIR}/${TOPNS}/db/oracleTrailer.sql | awk 'BEGIN { FS="[ (]+" } { print "DROP " $4, $5 ";" }' > ${TMPDIR}/${TOPNS}/db/oracleTrailer_drop.sql
grep 'CREATE OR REPLACE' ${TMPDIR}/${TOPNS}/db/postgresTrailer.sql | awk 'BEGIN { FS="[ (]+" } { print "DROP " $4, $5 ";" }' > ${TMPDIR}/${TOPNS}/db/postgresTrailer_drop.sql
(/usr/bin/gencastor.bin -o ${TMPDIR} -c ${TOPNS} --nocrashhandler ${XMIFILE} > /dev/tty) >& /dev/null
# hack to prevent Umbrello from overwriting the original XMI file
cp ${XMIFILE} ${TMPDIR}
set XMITOUSE=`echo ${XMIFILE} | awk -F'/' '{ print $NF }'`
echo ${XMITOUSE}
(/usr/bin/gencastor.bin -o ${TMPDIR} -c ${TOPNS} --nocrashhandler ${TMPDIR}/${XMITOUSE} > /dev/tty) >& /dev/null
set pushdsilent
pushd ${TMPDIR}
rm -f ${TOPNS}/db/*Generated*
rm -f ${TOPNS}/db/*Trailer_drop*
rm -f ${XMITOUSE}
foreach f (`find . -type f`)
#echo $f
if !(-f ${WORKDIR}/${f}) then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment