Skip to content
Browse files

add %h formatter for sha256sum

  • Loading branch information...
1 parent 40cd830 commit a099ff189a15965142f1221988f9e28f7840f09d @falconindy committed Aug 17, 2011
Showing with 6 additions and 1 deletion.
  1. +2 −0 README.pod
  2. +4 −1 expac.c
View
2 README.pod
@@ -108,6 +108,8 @@ The format argument allows the following interpreted sequences:
%g base64 encoded PGP signature (only with -S)
+ %h sha256sum
+
%i has install scriptlet (only with -Q)
%k download size (only with -S)
View
5 expac.c
@@ -37,7 +37,7 @@
#define DEFAULT_DELIM "\n"
#define DEFAULT_LISTDELIM " "
#define DEFAULT_TIMEFMT "%c"
-#define FORMAT_TOKENS "BCDEGLNOPRSabdmnprsuvw%"
+#define FORMAT_TOKENS "BCDEGLNOPRSabdhmnprsuvw%"
#define FORMAT_TOKENS_LOCAL "ilFw"
#define FORMAT_TOKENS_SYNC "fgk"
#define ESCAPE_TOKENS "\"\\abefnrtv"
@@ -424,6 +424,9 @@ static int print_pkg(alpm_pkg_t *pkg, const char *format) {
case 'g': /* base64 gpg sig */
out += printf(fmt, alpm_pkg_get_base64_sig(pkg));
break;
+ case 'h': /* sha256sum */
+ out += printf(fmt, alpm_pkg_get_sha256sum(pkg));
+ break;
/* times */
case 'b': /* build date */

0 comments on commit a099ff1

Please sign in to comment.
Something went wrong with that request. Please try again.