From 0c1374c143f1639c181423b0cd7886d4d75d8673 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Mon, 14 Sep 2015 17:37:44 +0000 Subject: [PATCH] Keep original pathes of source files We are migrating service client code from Tempest, and we need to migrate files under different pathes in a single patch. However, current migrating script handles them as the same path and we could not use the script for the migration. This patch changes the script for keeping original pathes of source files. Change-Id: Id42692aea4b7e132f49dbfe9a0a6551fa2a56770 --- tools/migrate_from_tempest.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/migrate_from_tempest.sh b/tools/migrate_from_tempest.sh index 23e47d2..acafcd6 100755 --- a/tools/migrate_from_tempest.sh +++ b/tools/migrate_from_tempest.sh @@ -66,11 +66,13 @@ cd - file_list='' for file in $files; do filename=`basename $file` + dirname=`dirname $file` if [ -n "$output_dir" ]; then - dest_file="$output_dir/$filename" + dirname="$output_dir" else - dest_file="tempest_lib/$filename" + dirname=`echo $dirname | sed s@tempest\/@tempest_lib/\@` fi + dest_file="$dirname/$filename" cp -r "$tmpdir/$file" "$dest_file" git add "$dest_file" if [[ -z "$file_list" ]]; then