Added simple script for creating basic drupal module template.
authorRafał Długołęcki <kontakt@dlugolecki.net.pl>
Fri, 22 Mar 2013 17:22:14 +0000 (18:22 +0100)
committerRafał Długołęcki <kontakt@dlugolecki.net.pl>
Fri, 22 Mar 2013 17:22:14 +0000 (18:22 +0100)
prj-create-module-drupal [new file with mode: 0755]

diff --git a/prj-create-module-drupal b/prj-create-module-drupal
new file mode 100755 (executable)
index 0000000..1aa5284
--- /dev/null
@@ -0,0 +1,34 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+my $name = shift;
+
+unless ($name) {
+    die <<USAGE;
+Usage: project-create-module-drupal NAME
+USAGE
+}
+
+mkdir $name;
+open (INFO, "> $name/$name.info");
+open (MODULE, "> $name/$name.module");
+open (README, "> $name/README");
+
+print INFO "name = " . ucfirst($name) . "
+description = The Great new " . ucfirst($name) . " module!
+version = 0.1
+core = 7.x
+";
+
+print MODULE "<?php \n";
+
+print README "Installation
+============
+
+";
+
+close (INFO);
+close (MODULE);
+close (README);