Skip to content

Commit

Permalink
Merge branch 'beeversion-newvars'
Browse files Browse the repository at this point in the history
* beeversion-newvars:
  beeversion: Add new variables *_UNDERSCORE *_DASH
  beeversion: Add prefix char to print formatted extraname and extraversion
  • Loading branch information
mariux committed Jun 4, 2012
2 parents 6b02ed3 + ef66e46 commit 503a339
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/bee_version_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)
printf(".%s", v->arch);
break;
}
if (*p) {
switch(*(p+1)) {
case 'x':
if (*(v->subname))
printf("%c%s", *p, v->subname);
p++;
continue;
case 'e':
if (*(v->extraversion))
printf("%c%s", *p, v->extraversion);
p++;
continue;
}
}
continue;
} /* if '%' */

Expand Down
4 changes: 4 additions & 0 deletions src/beeversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,12 @@ int main(int argc, char *argv[])

keyvalue = "PKGNAME=%p\n"
"PKGEXTRANAME=%x\n"
"PKGEXTRANAME_UNDERSCORE=%_x\n"
"PKGEXTRANAME_DASH=%-x\n"
"PKGVERSION=( @v )\n"
"PKGEXTRAVERSION=%e\n"
"PKGEXTRAVERSION_UNDERSCORE=%_e\n"
"PKGEXTRAVERSION_DASH=%-e\n"
"PKGREVISION=%r\n"
"PKGARCH=%a\n"
"PKGFULLNAME=%P\n"
Expand Down

0 comments on commit 503a339

Please sign in to comment.