Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | From a78fe4f792a9ac9f4d364e836c8855f48561d6f2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Robert Yang <liezhi.yang@windriver.com> |
| 3 | Date: Thu, 14 Jul 2016 19:52:18 -0700 |
| 4 | Subject: [PATCH 3/4] pkg-diff.sh: check for fifo(named pipe) |
| 5 | |
| 6 | Otherwise "cmp -s fifo1 fifo2" will wait for inputing forever. |
| 7 | |
| 8 | Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10] |
| 9 | |
| 10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
| 11 | --- |
| 12 | pkg-diff.sh | 7 +++++++ |
| 13 | 1 file changed, 7 insertions(+) |
| 14 | |
| 15 | diff --git a/pkg-diff.sh b/pkg-diff.sh |
| 16 | index 5dd3a38..1f353aa 100644 |
| 17 | --- a/pkg-diff.sh |
| 18 | +++ b/pkg-diff.sh |
| 19 | @@ -735,6 +735,13 @@ check_single_file() |
| 20 | return 1 |
| 21 | fi |
| 22 | ;; |
| 23 | + fifo*pipe*) |
| 24 | + ftype_new="`/usr/bin/file new/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'`" |
| 25 | + if [ "$ftype_new" = "$ftype" ]; then |
| 26 | + return 0 |
| 27 | + fi |
| 28 | + return 1 |
| 29 | + ;; |
| 30 | *) |
| 31 | if ! diff_two_files; then |
| 32 | return 1 |
| 33 | -- |
| 34 | 2.9.0 |
| 35 | |