r9780 - helma-ng/trunk/bin
[email protected] Fri, 15 May 2009 00:46:34 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090514224634.F3EDB3D0D6@mia> |
Author: hannes
Date: 2009-05-15 00:46:34 +0200 (Fri, 15 May 2009)
New Revision: 9780
Modified:
helma-ng/trunk/bin/create-app.js
Log:
Minor enhancements
Details at http://dev.helma.org/trac/helma/changeset/9780
Modified: helma-ng/trunk/bin/create-app.js
===================================================================
--- helma-ng/trunk/bin/create-app.js 2009-05-14 22:46:31 UTC (rev 9779)
+++ helma-ng/trunk/bin/create-app.js 2009-05-14 22:46:34 UTC (rev 9780)
@@ -30,18 +30,21 @@
var destination = new File(path);
if (destination.exists() && !destination.isDirectory()) {
- print(destination, "exists but not a directory, exiting");
- quit();
+ exit(destination, "exists but is not a directory, exiting.");
} else if (destination.isDirectory() && destination.list().length > 0) {
- print("Directory", destination, "exists but is not empty, exiting");
- quit()
+ exit("Directory", destination, "exists but is not empty, exiting.");
}
var skeleton = new File(properties["helma.home"], "apps/skeleton");
if (!skeleton.exists() || !skeleton.isDirectory()) {
- print("Can't find skeleton app in " + skeleton + ", exiting");
- quit();
+ exit("Can't find skeleton app in " + skeleton + ", exiting.");
}
-print("Copying application files to", destination, "...");
+
+write("Copying application files to", destination, "...");
skeleton.hardCopy(destination);
print("done");
+
+function exit() {
+ print.apply(null, arguments);
+ quit();
+}