projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT #28256: disable unused_credit_suspend and unused_credit_cancel packaging options...
[freeside.git]
/
bin
/
generate-table-module
diff --git
a/bin/generate-table-module
b/bin/generate-table-module
index
509feed
..
37a5812
100755
(executable)
--- a/
bin/generate-table-module
+++ b/
bin/generate-table-module
@@
-1,7
+1,11
@@
#!/usr/bin/perl
#!/usr/bin/perl
+use strict;
+use vars qw( $opt_n );
use FS::Schema qw( dbdef_dist );
use FS::Schema qw( dbdef_dist );
+use Getopt::Std;
+getopts('n');
my $table = shift;
###
my $table = shift;
###
@@
-65,6
+69,14
@@
while (my $line = <SRC>) {
close SRC;
close DEST;
close SRC;
close DEST;
+###
+# add to FS/FS/Mason.pm
+###
+
+my $magic = '# Sammath Naur';
+system("perl -pi -e 's/$magic/use FS::$table;\n $magic/' FS/FS/Mason.pm")
+ unless $opt_n;
+
###
# add FS/t/table.t
###
###
# add FS/t/table.t
###
@@
-83,10
+95,10
@@
close TEST;
# add them to MANIFEST
###
# add them to MANIFEST
###
-system('cvs edit FS/MANIFEST');
-
open(MANIFEST,">>FS/MANIFEST") or die $!;
print MANIFEST "FS/$table.pm\n",
"t/$table.t\n";
close MANIFEST;
open(MANIFEST,">>FS/MANIFEST") or die $!;
print MANIFEST "FS/$table.pm\n",
"t/$table.t\n";
close MANIFEST;
+system("git add FS/FS/$table.pm FS/t/$table.t");
+