[hackers] [farbfeld] 2ff: make it more portable || FRIGN

From: <git_AT_suckless.org>
Date: Mon, 19 Sep 2016 21:48:38 +0200 (CEST)

commit 48c52a1f4889858ae3466f1987b522e426b6ddf3
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Mon Sep 19 21:47:50 2016 +0200
Commit: FRIGN <dev_AT_frign.de>
CommitDate: Mon Sep 19 21:47:50 2016 +0200

    2ff: make it more portable
    
    Thanks Roberto and Evan Gates!

diff --git a/2ff b/2ff
index 1b61cef..9a252a9 100755
--- a/2ff
+++ b/2ff
_AT_@ -7,8 +7,8 @@ fi
 TMP=$(mktemp)
 cat > "$TMP"
 
-if [ "$(head -c 8 "$TMP")" = "farbfeld" ]; then
- cat < "$TMP"
+if [ "$(dd if="$TMP" bs=1 count=8 2>/dev/null)" = "farbfeld" ]; then
+ cat "$TMP"
         exit 0
 fi
 
Received on Mon Sep 19 2016 - 21:48:38 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 19 2016 - 22:00:16 CEST