OSDN Git Service

[BUG FIX] MOVED or REPLACED ports were possibly incorrectly detected as duplicated...
[portsreinstall/current.git] / lib / libfileedit.sh
index 910dfae..de19c87 100644 (file)
@@ -46,7 +46,7 @@ fileedit_add_a_line_if_new ()
 # ============= Remove lines exactly matching a string from multiple files =============
 fileedit_rm_a_line_from_files ()
 {
-       local item
+       local item filepath
        item=$1
        [ -n "$item" ] || return 0
        while read filepath
@@ -58,7 +58,7 @@ fileedit_rm_a_line_from_files ()
 # ============= Add a line to each of multiple files if no matching one exists in the file =============
 fileedit_add_a_line_to_files_if_new ()
 {
-       local item
+       local item filepath
        item=$1
        [ -n "$item" ] || return 0
        while read filepath
@@ -105,7 +105,7 @@ fileedit_combine_lists ()
 # ============= Manipulate old and new lines from an old and a new versions of a file =============
 fileedit_manipulate_old_new_lines ()
 {
-       local oldsrc newsrc olddiff newdiff
+       local oldsrc newsrc olddiff newdiff tmpdiff
        oldsrc=$1
        newsrc=$2
        olddiff=$3
@@ -121,7 +121,7 @@ fileedit_manipulate_old_new_lines ()
 # ============= Manipulate old lines from an old and a new versions of a file =============
 fileedit_manipulate_old_lines ()
 {
-       local oldsrc newsrc
+       local oldsrc newsrc tmpdiff
        oldsrc=$1
        newsrc=$2
        tmpdiff=${TMPDIR}/fileedit_manipulate_old_lines::diff
@@ -134,7 +134,7 @@ fileedit_manipulate_old_lines ()
 # ============= Manipulate new lines from an old and a new versions of a file =============
 fileedit_manipulate_new_lines ()
 {
-       local oldsrc newsrc
+       local oldsrc newsrc tmpdiff
        oldsrc=$1
        newsrc=$2
        tmpdiff=${TMPDIR}/fileedit_manipulate_new_lines::diff
@@ -147,7 +147,7 @@ fileedit_manipulate_new_lines ()
 # ============= Check whether removed lines exists in updating from an old and a new versions of a file =============
 fileedit_exists_old_lines ()
 {
-       local oldsrc newsrc
+       local oldsrc newsrc tmpdiff
        oldsrc=$1
        newsrc=$2
        tmpdiff=${TMPDIR}/fileedit_exists_old_lines::diff