How to copy only .war files in a folder to another folder(autodeploy)


# Create addons dir
ADDONS_DIR=/usr/local/somefolder/addons
if [ ! -d "$OS_ADDONS_DIR" ]; then
mkdir -p $OS_ADDONS_DIR
fi

ADDONS=`ls $ADDONS_DIR/*.war 2>/dev/null`
#if [[ "$ADDONS_DIR" ]]; then
for WARFILE in $ADDONS; do
rm -f $WEBDIR/${WARFILE##*/} &>/dev/null
ln -s $WARFILE $WEBDIR/${WARFILE##*/}
done

Supported language formatting:
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages