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.
This commit is contained in:
parent
8c2840b174
commit
5a2a63645f
2 changed files with 11 additions and 0 deletions
6
common/wrappers/date.sh
Normal file
6
common/wrappers/date.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$SOURCE_DATE_EPOCH" ]; then
|
||||
post="--date @$SOURCE_DATE_EPOCH"
|
||||
fi
|
||||
exec /usr/bin/date $@ $post
|
5
common/wrappers/uname.sh
Normal file
5
common/wrappers/uname.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
uname=$(/usr/bin/uname $@)
|
||||
rv=$?
|
||||
echo "$uname" | sed "s/\(^\| \)$(/usr/bin/uname -n)\($\| \)/\1void\2/"
|
Loading…
Reference in a new issue