[LON-CAPA-cvs] cvs: loncom /build cpfiles.pl

www www at source.lon-capa.org
Mon Oct 24 13:46:29 EDT 2011


www		Mon Oct 24 17:46:29 2011 EDT

  Modified files:              
    /loncom/build	cpfiles.pl 
  Log:
  Bug #1320
  
  
Index: loncom/build/cpfiles.pl
diff -u loncom/build/cpfiles.pl:1.1 loncom/build/cpfiles.pl:1.2
--- loncom/build/cpfiles.pl:1.1	Thu Oct 20 18:54:41 2011
+++ loncom/build/cpfiles.pl	Mon Oct 24 17:46:29 2011
@@ -102,6 +102,39 @@
       }
    } else {
       print "*** WARNING: $author has no domain. The author may not have published.\n";
+      print "Enter 1: do nothing, continue\n";
+      print "Enter 2: stop\n";
+      print "or enter domain for user to be placed into\n";
+      print "Your input: ";
+      my $choice=<STDIN>;
+      if ($choice==2) { print "Stopped.\n"; exit; }
+      if ($choice!=1) {
+         chomp($choice);
+         if ($choice) {
+            my $dompath="/home/httpd/html/priv/$choice";
+            my $newpath="/home/httpd/html/priv/$choice/$author";
+            unless (-e $dompath) {
+               print "*** WARNING: $dompath does not yet exist.\n";
+            }
+            if ($commit) {
+               print "Making author $author in domain $choice\n";
+               unless (-e $dompath) {
+                  print "Making $dompath\n";
+                  mkdir($dompath);
+                  chown($uid,$gid,$dompath);
+               }
+               print "Making $newpath\n";
+               mkdir($newpath);
+               chown($uid,$gid,$newpath);
+            } else {
+               print "Would make author $author in domain $choice\n";
+               unless (-e $dompath) {
+                  print "Would make $dompath\n";
+               }
+               print "Would make $newpath\n";
+            }
+         }
+      }
    }
 }
 print "\nDone.\n";




More information about the LON-CAPA-cvs mailing list