#/usr/bin/bash

### INIT ###
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR

if (( "$#" != 2 )) 
then
    echo "Usage: $0 app_name app_version, e.g. $0 devcenter 1.0.0"
exit 1
fi

APP_NAME=$1
APP_VERSION=$2


### BUILD ###
npm install

### PACKAGE ###
# collect temp files in target dir  (maven standard)
mkdir -p target/
cd target/

#create dir for packaging
mkdir $APP_NAME
cd $APP_NAME

#create links to things to be packaged
ln -s $SCRIPT_DIR/app.js
ln -s $SCRIPT_DIR/start.js
ln -s $SCRIPT_DIR/jp.py
ln -s $SCRIPT_DIR/lib
ln -s $SCRIPT_DIR/make_pkg.sh
ln -s $SCRIPT_DIR/package.json
ln -s $SCRIPT_DIR/public
ln -s $SCRIPT_DIR/routes
ln -s $SCRIPT_DIR/views
ln -s $SCRIPT_DIR/node_modules

#create the tar!
cd ..
#tar czfh $APP_NAME-$APP_VERSION.tar.gz $APP_NAME/*
zip -r $APP_NAME-$APP_VERSION.zip $APP_NAME/*



#/usr/bin/bash

### INIT ###
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR

if (( "$#" != 2 )) 
then
	echo "Usage: $0 app_name app_version, e.g. $0 devcenter 1.0.0"
	exit 1
fi

APP_NAME=$1
APP_VERSION=$2


### BUILD ###
npm install

### PACKAGE ###
# collect temp files in target dir  (maven standard)
mkdir -p target/
cd target/

#create dir for packaging
mkdir $APP_NAME
cd $APP_NAME

#create links to things to be packaged
ln -s $SCRIPT_DIR/app.js
ln -s $SCRIPT_DIR/start.js
ln -s $SCRIPT_DIR/jp.py
ln -s $SCRIPT_DIR/lib
ln -s $SCRIPT_DIR/make_pkg.sh
ln -s $SCRIPT_DIR/package.json
ln -s $SCRIPT_DIR/public
ln -s $SCRIPT_DIR/routes
ln -s $SCRIPT_DIR/views
ln -s $SCRIPT_DIR/node_modules
ln -s $SCRIPT_DIR/mmx-console.sh

#create the tar!
cd ..
#tar czfh $APP_NAME-$APP_VERSION.tar.gz $APP_NAME/*
zip -r $APP_NAME-$APP_VERSION.zip $APP_NAME/*



Add mmx-console.sh to the packaging
Add mmx-console.sh to the packaging


Former-commit-id: c54f92e89aef8cb387dfa5d09e44d2878079ef6d
Former-commit-id: 63179acd660a271659e79d1500b048b2e8f54f15
Former-commit-id: 0d03ec9d98aded63dd3e8a271fa78357a45b086c
Former-commit-id: e0f616598785bcb2c4b2e73650d6d7a4b7a131e4