summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@gmx.at>2017-10-04 03:46:51 +0200
committerNico Huber <nico.h@gmx.de>2017-10-05 10:41:23 +0000
commit5bf6b855d4083070390b5c0eb03bca678090d75d (patch)
treeee7e58ceb379e20056a6a393f97b749ab29acee0 /util
parent8eb1df69ab22829d61366e7d8e4eca6d7ed13657 (diff)
downloadflashrom-5bf6b855d4083070390b5c0eb03bca678090d75d.tar.gz
flashrom-5bf6b855d4083070390b5c0eb03bca678090d75d.tar.bz2
flashrom-5bf6b855d4083070390b5c0eb03bca678090d75d.zip
fixup! Convert flashrom to git
Rename getrevision's local_revision function to just revision. All revisions are local in git and we certainly wont go back to a non-distributed VCS :) Change-Id: I6689ac24077b3981b471ed69de7cc3ef79d435b1 Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/21829 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util')
-rwxr-xr-xutil/getrevision.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/getrevision.sh b/util/getrevision.sh
index 9dd4dbe1c..80812b457 100755
--- a/util/getrevision.sh
+++ b/util/getrevision.sh
@@ -130,8 +130,7 @@ timestamp() {
echo "${t}"
}
-# Retrieve local revision info.
-local_revision() {
+revision() {
local r
if git_is_file_tracked "$1" ; then
r=$(git describe $(git_last_commit "$1"))
@@ -158,8 +157,9 @@ Commands
this message
-c or --check
test if path is under version control at all
- -l or --local
- local revision information including an indicator for uncommitted changes
+ -r or --revision
+ return unique revision information including an indicator for
+ uncommitted changes
-U or --url
URL associated with the latest commit
-d or --date
@@ -188,10 +188,6 @@ main() {
-h|--help)
action=show_help;
shift;;
- -l|--local)
- check_action $1
- action=local_revision
- shift;;
-U|--url)
check_action $1
action=scm_url
@@ -200,6 +196,10 @@ main() {
check_action $1
action="timestamp +%Y-%m-%d" # refrain from suffixing 'Z' to indicate it's UTC
shift;;
+ -r|--revision)
+ check_action $1
+ action=revision
+ shift;;
-t|--timestamp)
check_action $1
action="timestamp +%Y-%m-%dT%H:%M:%SZ" # There is only one valid time format! ISO 8601