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
This commit is contained in:
Ken'ichi Ohmichi 2015-09-14 17:37:44 +00:00
parent 9a58df8abe
commit 0c1374c143
1 changed files with 4 additions and 2 deletions

View File

@ -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