Blame scripts/cvs-wd-timestamp
|
Matthias Brugger |
c8a553 |
#! /bin/bash
|
|
Michal Marek |
9bee79 |
|
|
Michal Marek |
0a417c |
#############################################################################
|
|
Michal Marek |
0a417c |
# Copyright (c) 2004,2007-2009 Novell, Inc.
|
|
Michal Marek |
0a417c |
# All Rights Reserved.
|
|
Michal Marek |
0a417c |
#
|
|
Michal Marek |
0a417c |
# This program is free software; you can redistribute it and/or
|
|
Michal Marek |
0a417c |
# modify it under the terms of version 2 of the GNU General Public License as
|
|
Michal Marek |
0a417c |
# published by the Free Software Foundation.
|
|
Michal Marek |
0a417c |
#
|
|
Michal Marek |
0a417c |
# This program is distributed in the hope that it will be useful,
|
|
Michal Marek |
0a417c |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Michal Marek |
0a417c |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Michal Marek |
0a417c |
# GNU General Public License for more details.
|
|
Michal Marek |
0a417c |
#
|
|
Michal Marek |
0a417c |
# You should have received a copy of the GNU General Public License
|
|
Michal Marek |
0a417c |
# along with this program; if not, contact Novell, Inc.
|
|
Michal Marek |
0a417c |
#
|
|
Michal Marek |
0a417c |
# To contact Novell about this file by physical or electronic mail,
|
|
Michal Marek |
0a417c |
# you may find current contact information at www.novell.com
|
|
Michal Marek |
0a417c |
#############################################################################
|
|
Michal Marek |
0a417c |
|
|
Michal Marek |
9bee79 |
# A timestamp used to be the only way to describe the state of the cvs
|
|
Michal Marek |
9bee79 |
# repository, but it might be useful even now (e.g. "how old is this kernel?")
|
|
Michal Marek |
9bee79 |
|
|
Michal Marek |
9bee79 |
. ${0%/*}/wd-functions.sh
|
|
Michal Marek |
9bee79 |
|
|
Michal Marek |
9bee79 |
if $using_git; then
|
|
Michal Marek |
9bee79 |
# Just echo the commit timestamp of HEAD
|
|
Michal Marek |
9bee79 |
ts=$(git show --pretty=format:%ct HEAD | head -n 1)
|
|
Jiri Slaby |
386cbe |
TZ=UTC date "+%Y-%m-%d %H:%M:%S %z" -d "1970-01-01 00:00 UTC $ts seconds"
|
|
Michal Marek |
9bee79 |
exit
|
|
Michal Marek |
9bee79 |
fi
|
|
Michal Marek |
9bee79 |
|