Skip to content

Commit

Permalink
dr-elephant#95: copy conf files to zip package automatically (linkedi…
Browse files Browse the repository at this point in the history
  • Loading branch information
YannByron authored and akshayrai committed Jul 7, 2016
1 parent 0cbe15e commit 2229a58
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ cd ${project_root}

start_script=${project_root}/scripts/start.sh
stop_script=${project_root}/scripts/stop.sh
app_conf=${project_root}/app-conf

# Echo the value of pwd in the script so that it is clear what is being removed.
rm -rf ${project_root}/dist
Expand All @@ -107,6 +108,8 @@ cp $start_script ${DIST_NAME}/bin/

cp $stop_script ${DIST_NAME}/bin/

cp -r $app_conf ${DIST_NAME}

zip -r ${DIST_NAME}.zip ${DIST_NAME}

mv ${DIST_NAME}.zip ${project_root}/dist/
File renamed without changes.
12 changes: 8 additions & 4 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ project_root=$script_dir/../
# User could set an environmental variable, ELEPHANT_CONF_DIR, or pass an optional argument(config file path)
if [ -z "$1" ]; then
if [ -z "$ELEPHANT_CONF_DIR" ]; then
echo "error: Couldn't find the configuration directory."
echo "Please set env variable ELEPHANT_CONF_DIR to the configuration directory or pass the location as an argument."
print_usage
exit 1
if [ -d "${project_root}/app-conf" ]; then
ELEPHANT_CONF_DIR=$project_root/app-conf
else
echo "error: Couldn't find the configuration directory."
echo "Please set env variable ELEPHANT_CONF_DIR to the configuration directory or pass the location as an argument."
print_usage
exit 1
fi
fi
CONF_DIR="$ELEPHANT_CONF_DIR"
else
Expand Down

0 comments on commit 2229a58

Please sign in to comment.