summaryrefslogtreecommitdiff
path: root/lib/rpmscript.h
blob: 8df2cc362f0102c777e3ad08c4379d60b4dc6efa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _RPMSCRIPT_H
#define _RPMSCRIPT_H

#include <rpm/rpmtypes.h>
#include <rpm/argv.h>

typedef struct rpmScript_s * rpmScript;

struct rpmScript_s {
    rpmTag tag;		/* script tag */
    char **args;	/* scriptlet call arguments */
    char *body;		/* script body */
    char *descr;	/* description for logging */
};

RPM_GNUC_INTERNAL
rpmScript rpmScriptFromTag(Header h, rpmTag scriptTag);

RPM_GNUC_INTERNAL
rpmScript rpmScriptFree(rpmScript script);

RPM_GNUC_INTERNAL
rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2,
                   rpmts ts, ARGV_const_t prefixes, int warn_only);

#endif /* _RPMSCRIPT_H */