From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- tools/update-packaging/test/diffmar.sh | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 tools/update-packaging/test/diffmar.sh (limited to 'tools/update-packaging/test/diffmar.sh') diff --git a/tools/update-packaging/test/diffmar.sh b/tools/update-packaging/test/diffmar.sh new file mode 100755 index 0000000000..4b16ffb77a --- /dev/null +++ b/tools/update-packaging/test/diffmar.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Compares two mars + +marA="$1" +marB="$2" +testDir="$3" +workdir="/tmp/diffmar/$testDir" +fromdir="$workdir/0" +todir="$workdir/1" + +# On Windows, creation time can be off by a second or more between the files in +# the fromdir and todir due to them being extracted synchronously so use +# time-style and exclude seconds from the creation time. +lsargs="-algR" +unamestr=`uname` +if [ ! "$unamestr" = 'Darwin' ]; then + unamestr=`uname -o` + if [ "$unamestr" = 'Msys' -o "$unamestr" = "Cygwin" ]; then + lsargs="-algR --time-style=+%Y-%m-%d-%H:%M" + fi +fi + +rm -rf "$workdir" +mkdir -p "$fromdir" +mkdir -p "$todir" + +cp "$1" "$fromdir" +cp "$2" "$todir" + +cd "$fromdir" +mar -x "$1" +rm "$1" +rm -f updatev2.manifest # Older files may contain this +mv updatev3.manifest updatev3.manifest.xz +xz -d updatev3.manifest.xz +ls $lsargs > files.txt + +cd "$todir" +mar -x "$2" +rm "$2" +mv updatev3.manifest updatev3.manifest.xz +xz -d updatev3.manifest.xz +ls $lsargs > files.txt + +echo "diffing $fromdir and $todir" +echo "on linux shell sort and python sort return different results" +echo "which can cause differences in the manifest files" +diff -ru "$fromdir" "$todir" -- cgit v1.2.3