projects
/
openwrt
/
staging
/
jow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add scripts/portable_date: wrapper around date for bsd/linux
[openwrt/staging/jow.git]
/
scripts
/
portable_date.sh
diff --git a/scripts/portable_date.sh
b/scripts/portable_date.sh
new file mode 100755
(executable)
index 0000000..
84a18eb
--- /dev/null
+++ b/
scripts/portable_date.sh
@@ -0,0
+1,11
@@
+#!/bin/sh
+
+case $(uname) in
+ NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin)
+ date -r $1 $2
+ ;;
+ *)
+ date -d @$1 $2
+esac
+
+exit $?