airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [02/16] git commit: updating script to use rsync for sycning generated code
Date Sun, 09 Feb 2014 03:14:17 GMT
updating script to use rsync for sycning generated code


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/85f95280
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/85f95280
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/85f95280

Branch: refs/heads/master
Commit: 85f95280f72770116588bc6638d42fe380bf015d
Parents: a977952
Author: Suresh Marru <smarru@apache.org>
Authored: Sat Feb 8 22:10:47 2014 -0500
Committer: Suresh Marru <smarru@apache.org>
Committed: Sat Feb 8 22:10:47 2014 -0500

----------------------------------------------------------------------
 airavata-api/generate-thrift-files.sh | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/85f95280/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/airavata-api/generate-thrift-files.sh b/airavata-api/generate-thrift-files.sh
index 95b1d64..7993a35 100755
--- a/airavata-api/generate-thrift-files.sh
+++ b/airavata-api/generate-thrift-files.sh
@@ -84,16 +84,9 @@ copy_changed_files() {
     echo "Generated sources are in $GENERATED_CODE_DIR"
     echo "Destination workspace is in $WORKSPACE_SRC_DIR"
 
-#    SDIR="${GENERATED_CODE_DIR}/org/apache/airavata/model/experiment"
-#    DDIR="${EXISTING_SRC_DIR}/org/apache/airavata/model/experiment"
-#    mkdir -p "$DDIR"
-#    for f in "$SDIR"/*.java; do
-#    DEST="$DDIR/`basename $f`"
-#    if ! cmp -s "${f}-with-license" "${DEST}" ; then
-#      echo "Copying ${f}-with-license to ${DEST}"
-#      cp -f "${f}-with-license" "${DEST}" || fail unable to copy files to java workspace
-#    fi
-#    done
+    # Check if the newly generated files exist in the targetted workspace, if not copy. Only
changed files will be synced.
+    #  the extra slash to GENERATED_CODE_DIR is needed to ensure the parent directory itself
is not copied.
+    rsync -auv $GENERATED_CODE_DIR/ $WORKSPACE_SRC_DIR
 }
 
 # Generation of thrift files will require installing Apache Thrift. Please add thrift to
your path.
@@ -132,10 +125,10 @@ thrift ${THRIFT_ARGS} --gen java $THRIFT_IDL_DIR/airavataAPI.thrift
|| fail unab
 add_license_header $JAVA_GEN_DIR
 
 # Compare the newly generated classes with existing server skelton sources and replace the
changed ones.
-#copy_changed_files $JAVA_GEN_DIR $SERVER_SRC_DIR
+copy_changed_files $JAVA_GEN_DIR $SERVER_SRC_DIR
 
 # Compare the newly generated classes with existing java client stub sources and replace
the changed ones.
-#copy_changed_files $JAVA_GEN_DIR $JAVA_CLIENT_SRC_DIR
+copy_changed_files $JAVA_GEN_DIR $JAVA_CLIENT_SRC_DIR
 
 ##############################
 # Update Airavata Data Model #
@@ -159,7 +152,7 @@ add_license_header $JAVA_BEAN_GEN_DIR
 copy_changed_files $JAVA_BEAN_GEN_DIR $DATAMODEL_SRC_DIR
 
 # CleanUp: Delete the base target build directory
-#rm -rf $BASE_TARGET_DIR
+rm -rf $BASE_TARGET_DIR
 
 echo "Successfully generated new sources, compared against exiting code and replaced the
changed files"
 exit 0
\ No newline at end of file


Mime
View raw message