Debianization, and minor fixes.
[fastforward] / install.c
index beec00c..59426df 100644 (file)
--- 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);
 }