#!/bin/sh if [ -z $1 ] then echo "Usage: $0 [Package]" exit 1 fi echo "Costruzione pacchetto war in corso..." cd $1 jar -cvf $1.war . >/dev/null if [ $? -ne 0 ]; then echo "Si e' verificato un errore durante la creazione del war..." exit 1 fi tmp_date=`/bin/date +%Y-%m-%d_%H:%M:%S` mv $1.war ../wars/$1-$tmp_date.war cd .. echo "Pacchetto war costruito con successo [`pwd`/wars/$1-$tmp_date.war]" exit 0