X-Git-Url: https://git.distorted.org.uk/~mdw/fastforward/blobdiff_plain/8d5530c492ec12fb0878d828a372ef5ee2e909f3..refs/heads/master:/install.c diff --git a/install.c b/install.c index beec00c..59426df 100644 --- a/install.c +++ b/install.c @@ -5,7 +5,7 @@ #include "readwrite.h" #include "exit.h" -extern void hier(); +extern void hier(char *); #define FATAL "install: fatal: " @@ -99,13 +99,16 @@ int mode; strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": "); } -void main() +void main(int argc, char *argv[]) { + char *home = 0; fdsourcedir = open_read("."); + if (argc > 1) + home = argv[1]; if (fdsourcedir == -1) strerr_die2sys(111,FATAL,"unable to open current directory: "); umask(077); - hier(); + hier(home); _exit(0); }