e7548edb5f
Using -ef to check for the same file is nicer than relying on a magic symlink-to-fakedate. Notice that -ef isn't stricly posix (but supported by bash/dash/zsh), so I've changed the shebang to /bin/bash. While we are at it, restructure the logic to do a single exec at the end instead of handling the epoch/!epoch cases differently for simplicity. With that out of the way we can directly install it as $HOST/usr/bin/date instead of the fakedate / date symlink. [Peter: drop IFS=: change] Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
15 lines
389 B
Makefile
15 lines
389 B
Makefile
################################################################################
|
|
#
|
|
# fakedate
|
|
#
|
|
################################################################################
|
|
|
|
# source included in buildroot
|
|
HOST_FAKEDATE_LICENSE = GPL-2.0+
|
|
|
|
define HOST_FAKEDATE_INSTALL_CMDS
|
|
$(INSTALL) -D -m 755 package/fakedate/fakedate $(HOST_DIR)/usr/bin/date
|
|
endef
|
|
|
|
$(eval $(host-generic-package))
|