#define SOFT 1
#define HARD 2
+static int list_scripts(void *ud, const char *pkg, const char *stage,
+ const char *hash) {
+ printf("%s %s %.8s\n", pkg, stage, hash);
+ return 0;
+}
+
int main(int ac, char **av){
struct zpm zpm;
int rv;
fail = HARD;
}
} else if (mode == LIST) {
- if (!zpm_script_hash(&zpm, pkgid, phase, hash)) {
+ if (!phase) {
+ zpm_foreach_script(&zpm, pkgid, phase, 0, list_scripts);
+ } else if (!zpm_script_hash(&zpm, pkgid, phase, hash)) {
fail = SOFT;
} else if (scriptishash) {
printf("%s\n", hash);