X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-extract.c;h=220fafaa88e314d9685a7926d0f2f865ffb1c277;hb=63339873b48653db56a74dc6b08e73608d793bdf;hp=76528abf6e3861159d365140a768f179116dfce8;hpb=0715d7b43a936dfe6696676fd6852b3f84c9eac4;p=zpackage diff --git a/zpm-extract.c b/zpm-extract.c index 76528ab..220fafa 100644 --- a/zpm-extract.c +++ b/zpm-extract.c @@ -9,10 +9,22 @@ #include "zpm.h" +/* more usage: + * -t : use a temp file, then move into place, possible reverse the sense + * -u : userid + * -g : groupid + * -m : mode (i.e. final mode) + int mode = 0600; + * -l : log all actions + * -d : logging database file, if different + * + * check if file exists, if it does, and has the same hash, do + * nothing, unless -f is given + */ + #if 1 int main(int ac, char **av){ struct zpm pkg; - int mode = 0644; int rv; if (ac < 3) { @@ -20,8 +32,9 @@ int main(int ac, char **av){ return 1; } zpm_open(&pkg, av[1]); - rv = zpm_extract(&pkg, av[2], av[3], mode); + rv = zpm_extract(&pkg, av[2], av[3], 0600); zpm_close(&pkg); + return rv ? 0 : 1; } #else