1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/host_tools/fakeroot/test/compare-tar
2024-07-22 01:58:46 -03:00

24 lines
643 B
Bash
Executable File

#!/bin/sh
set -e
echo compare-tar:
gzip -dc $1 | tar -tvf - |awk '{print $1, $2, $3, $NF}' |sort > tmp-1
gzip -dc $2 | tar -tvf - |awk '{print $1, $2, $3, $NF}' |sort > tmp-2
diff tmp-1 tmp-2 > tmp-diff || true
if test -s tmp-diff; then
echo tar files differ:
cat tmp-diff
if test -n "$FAKEROOT_INTERACTIVE_TARTEST"; then
echo
echo 'You are now inside the "fakeroot" shell, so that you can examine'
echo the problem more closely. Just type exit to get away from here.
echo tmp-1 comes from ../tartest.gz.uue, tmp-2 is the just-built
echo faketar.tar.gz, with the current fakeroot.
sh
fi
exit 1
fi
exit 0