summaryrefslogtreecommitdiffstats
path: root/tools/squashfskit4/patches/0001-fix-version.sh.patch
blob: 5f0894bc1751610faad5d0d9e203a601764da5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/squashfs-tools/version.sh
+++ b/squashfs-tools/version.sh
@@ -27,13 +27,11 @@ if [ -z "$OUTPUT" ] ; then
 fi
 
 our_date() {
-case $(uname) in
-NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin)
-        date -r "$1" "$2"
-        ;;
-*)
-        date -d "@$1" "$2"
-esac
+	if date --version 2>&1 | grep -q "GNU coreutils"; then
+		date -d "@$1" "$2"
+	else
+		date -r "$1" "$2"
+	fi
 }
 
 try_version() {