Index: trunk/psconfig/pschecklibs
===================================================================
--- trunk/psconfig/pschecklibs	(revision 26271)
+++ trunk/psconfig/pschecklibs	(revision 26273)
@@ -75,4 +75,12 @@
 if ("$version" eq "") {
     $version = "default";
+}
+
+# generate new psconfig.csh if needed
+if (! -e "psconfig.csh" || ! -e "psconfig.bash") {
+    $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");
 }
 
