#!/bin/bash mode=`cat system.conf | awk -F = '{print$2}'` if [ -z "$mode" ]; then echo "mode is not set" exit 1 fi project=`echo $mode | awk -F - '{print $1}'` if [ -z "$project" ]; then echo "mode format is wrong" exit 1 fi logdir=/var/www/data/log/luigi/$project if [ ! -d "$logdir" ];then mkdir -p $logdir fi jardir=jar if [ ! -d "$jardir" ];then mkdir $jardir fi rm -rf logs ln -s $logdir logs mvn clean package -DskipTests -U > /dev/null r=$? if [ "$r" == "0" ] ; then echo 'build success' else echo 'build fail' exit 1 fi