#!/usr/bin/env bash
# *****************************************************************************
# @author CsHeng
# @2017.9.14 init
#
# 简单禁用tinker标志位
#
#
# *****************************************************************************

# get current shell absolute dir
CWD=$(cd "$(dirname "$0")"; pwd)

source ${CWD}/tinker_env.sh

# sample .rsyncenv file content: REMOTE_DIR=chenshuoheng@192.168.2.100:/app/halo/
REMOTE=`grep -r REMOTE_DIR ${CWD}/.rsyncenv | awk -F '=' '{print $2}'`

echo "retrieving from ${REMOTE} to ${APP_RELEASE_ALL}"
# 根目录是脚本文件所在的上一级
rsync --exclude-from=${CWD}/.rsyncignore -rctvOe 'ssh -p 32200' ${REMOTE} ${APP_RELEASE_ALL}