Index: /trunk/psconfig/psbuild
===================================================================
--- /trunk/psconfig/psbuild	(revision 16287)
+++ /trunk/psconfig/psbuild	(revision 16288)
@@ -97,4 +97,12 @@
 }
 
+# generate new psconfig.csh if needed
+if (! -e psconfig.csh) {
+    $psconfdir = $ENV{'PSCONFDIR'};
+    if ($psconfdir eq "") { die "PSCONFDIR not found, run psbuild -bootstrap and follow instructions\n"; }
+    vsystem ("cat psconfig.csh.in | sed 's|\@PSCONFDIR@|$psconfdir|' > psconfig.csh");
+    vsystem ("cat psconfig.bash.in | sed 's|\@PSCONFDIR@|$psconfdir|' > psconfig.bash");
+}
+
 &load_distfile ();
 
@@ -112,4 +120,11 @@
     if ("$version" eq "") {
 	$version = "default";
+    }
+
+    if (! -e psconfig.csh) {
+	$psconfdir = $ENV{'PSCONFDIR'};
+	if ($psconfdir eq "") { die "PSCONFDIR not found, run psbuild -bootstrap and follow instructions\n"; }
+	vsystem ("cat psconfig.csh.in | sed 's|\@PSCONFDIR@|$psconfdir|' > psconfig.csh");
+	vsystem ("cat psconfig.bash.in | sed 's|\@PSCONFDIR@|$psconfdir|' > psconfig.bash");
     }
 
