Annotation of /tags/mkinitrd-6_4_0/isolinux/gen-id.sh
Parent Directory | Revision Log
Revision 1313 -
(hide annotations)
(download)
(as text)
Fri May 27 18:20:23 2011 UTC (13 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 754 byte(s)
Fri May 27 18:20:23 2011 UTC (13 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 754 byte(s)
tagged 'mkinitrd-6_4_0'
1 | niro | 1133 | #!/bin/sh |
2 | # | ||
3 | # Create a build ID for this build. If we're using a git tree, | ||
4 | # generate an ID from "git describe", otherwise use the passed-in | ||
5 | # timestamp. | ||
6 | # | ||
7 | # Usage: gen-id.sh version timestamp | ||
8 | # | ||
9 | |||
10 | ver="$1" | ||
11 | tim="$2" | ||
12 | top=`dirname "$0"` | ||
13 | |||
14 | if test -n "$GIT_DIR" -o -d "$top"/.git -o -f "$top"/.git; then | ||
15 | id="$(git describe)" | ||
16 | if test -n "$id"; then | ||
17 | if test x"$(echo "$id" | cut -d- -f1)" = xsyslinux; then | ||
18 | id="$(echo "$id" | cut -d- -f2-)" | ||
19 | if test x"$(echo "$id" | cut -d- -f1)" = x"$ver"; then | ||
20 | id="$(echo "$id" | cut -d- -f2-)" | ||
21 | fi | ||
22 | fi | ||
23 | fi | ||
24 | if test -n "$id"; then | ||
25 | if test -n "$(git diff-index --name-only HEAD)"; then | ||
26 | id="${id}"\* | ||
27 | fi | ||
28 | fi | ||
29 | fi | ||
30 | if test -z "$id"; then | ||
31 | id="$tim" | ||
32 | fi | ||
33 | echo "$id" |
Properties
Name | Value |
---|---|
svn:executable | * |