remove unused patch label
This commit is contained in:
+4
-3
@@ -33,6 +33,7 @@ is_ignored() {
|
||||
;;
|
||||
*)
|
||||
case "$_name" in $_pattern) return 0 ;; esac
|
||||
case "$_rel" in $_pattern/*) return 0 ;; esac
|
||||
;;
|
||||
esac
|
||||
done < "$IGNORE_FILE"
|
||||
@@ -53,12 +54,12 @@ find "$CORE" -not -path "$CORE/.git/*" -type f | sort | while read -r dst_file;
|
||||
if [ -f "$src_file" ]; then
|
||||
if ! diff -q "$src_file" "$dst_file" > /dev/null 2>&1; then
|
||||
mkdir -p "$(dirname "$patch_file")"
|
||||
diff -u "$src_file" "$dst_file" > "$patch_file" || true
|
||||
diff -u --label "a/$rel" --label "b/$rel" "$src_file" "$dst_file" > "$patch_file" || true
|
||||
echo " Modified: $rel"
|
||||
fi
|
||||
else
|
||||
mkdir -p "$(dirname "$patch_file")"
|
||||
diff -u /dev/null "$dst_file" > "$patch_file" || true
|
||||
diff -u --label /dev/null --label "b/$rel" /dev/null "$dst_file" > "$patch_file" || true
|
||||
echo " New: $rel"
|
||||
fi
|
||||
done
|
||||
@@ -72,7 +73,7 @@ find "$SING_BOX" -not -path "$SING_BOX/.git/*" -type f | sort | while read -r sr
|
||||
|
||||
if [ ! -f "$dst_file" ]; then
|
||||
mkdir -p "$(dirname "$patch_file")"
|
||||
diff -u "$src_file" /dev/null > "$patch_file" || true
|
||||
diff -u --label "a/$rel" --label /dev/null "$src_file" /dev/null > "$patch_file" || true
|
||||
echo " Deleted: $rel"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user