From 5a2a63645fd9c165b1db77d85f1edb91e9348a82 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Thu, 3 Mar 2016 11:31:57 +0100 Subject: [PATCH] common/wrappers: add date and uname wrappers. uname: overwrites the hostname in command uname with the string 'void'. date: uses the timestamp read from SOURCE_DATE_EPOCH as date. --- common/wrappers/date.sh | 6 ++++++ common/wrappers/uname.sh | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 common/wrappers/date.sh create mode 100644 common/wrappers/uname.sh diff --git a/common/wrappers/date.sh b/common/wrappers/date.sh new file mode 100644 index 0000000000..2baed65f59 --- /dev/null +++ b/common/wrappers/date.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$SOURCE_DATE_EPOCH" ]; then + post="--date @$SOURCE_DATE_EPOCH" +fi +exec /usr/bin/date $@ $post diff --git a/common/wrappers/uname.sh b/common/wrappers/uname.sh new file mode 100644 index 0000000000..8c57364a14 --- /dev/null +++ b/common/wrappers/uname.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +uname=$(/usr/bin/uname $@) +rv=$? +echo "$uname" | sed "s/\(^\| \)$(/usr/bin/uname -n)\($\| \)/\1void\2/"