summaryrefslogtreecommitdiffstats
path: root/util/bin/krebdate
blob: b2aa02d25a8362e10a1295a8197a8aa02268fbb1 (plain)
1
2
3
4
5
6
7
8
9
10
#! /bin/sh
set -euf

if test "${nosudo-false}" != true -a `id -u` != 0; then
  echo "we're going sudo..." >&2
  exec sudo "$0" "$@"
  exit 23 # go to hell
fi

date --date="`ssh krebs 'date --rfc-3339=s'`"