Index: trunk/psconfig/psbuild
===================================================================
--- trunk/psconfig/psbuild	(revision 27951)
+++ trunk/psconfig/psbuild	(revision 28067)
@@ -10,4 +10,6 @@
 $profile = 0;
 $developer = 0;
+$magic = 0;
+$operations = 0;
 $start = "";
 $stop = "";
@@ -59,4 +61,8 @@
         shift; next;
     }
+    if ($ARGV[0] eq "-magic") {
+        $magic = 1;
+        shift; next;
+    }
     if ($ARGV[0] eq "-optimize") {
         $optimize = 1;
@@ -69,4 +75,11 @@
     if ($ARGV[0] eq "-dev") {
         $developer = 1;
+        shift; next;
+    }
+    # basic settings for the operations installation
+    if ($ARGV[0] eq "-ops") {
+        $developer = 1;
+        $optimize = 1;
+	$magic = 1;
         shift; next;
     }
@@ -167,4 +180,18 @@
 
 sub build_distribution {
+
+    # the operations system needs to first update the magic software
+    if ($magic) {
+	$homedir = `pwd`; chomp $homedir;
+	chdir "../magic";
+
+	if (! -d magic || ! -d ssa-core-cpp || ! -d qt-everywhere-opensource-src-4.6.1) {
+	    $status = vsystem ("make update");
+	    if ($status) { die "failed to untar magic directories"; }
+	} else {
+	    print "magic directories exist; run make update manually if needed\n";
+	}
+	chdir $homedir;
+    }
 
     # use psconfig.csh to set needed build aliases
