From b71a184817f11812e5ad7db8ce078cf467046405 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Mon, 9 May 2016 17:41:21 +0200 Subject: [PATCH] Fix pkgmgr-create-delta.sh.in To verify, generated delta file from two version of widget: $ pkgcmd -X v1 -Y v2 and check that delta includes removed and added files. Change-Id: Ic6d90018214f7b689d70b1cfb30fbdd3bc792cc2 --- data/pkgmgr-create-delta.sh.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/pkgmgr-create-delta.sh.in b/data/pkgmgr-create-delta.sh.in index b22963e..aa643a8 100644 --- a/data/pkgmgr-create-delta.sh.in +++ b/data/pkgmgr-create-delta.sh.in @@ -147,6 +147,8 @@ while read line action="only" elif [ $count -eq 2 ]; then file1=$word; + elif [ $count -eq 3 ]; then + file=$word; elif [ $count -eq 4 ]; then file2=$word; elif [ $count -eq 5 ]; then @@ -216,7 +218,7 @@ while read line `echo "" >> $sample_delta/modified.xml` fi - elif [[ "$action" == "only" && "$file1" =~ "$old_pkg_unzip_path" ]]; then + elif [[ "$action" == "only" && "$file" =~ "$old_pkg_unzip_path" ]]; then parent_path=${line##*$old_pkg_unzip_path} #echo "removed " $parent_path string_to_replace_with="/" @@ -232,7 +234,7 @@ while read line dirpath="$dirpath/" fi `echo "" >> $sample_delta/removed.xml` - elif [[ "$action" == "only" && "$file1" =~ "$new_pkg_unzip_path" ]]; then + elif [[ "$action" == "only" && "$file" =~ "$new_pkg_unzip_path" ]]; then parent_path=${line##*$new_pkg_unzip_path} #echo "added " $parent_path string_to_replace_with="/" -- 2.7.4