summaryrefslogtreecommitdiff
path: root/lib/sbin/MakeUtils.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-04 12:32:07 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-04 12:32:07 +0000
commita8ba1c3861f205eea682c928439d8315b74f2232 (patch)
treeaa53dec30f11e0e04d78d960aa6de44d999f6f13 /lib/sbin/MakeUtils.pl
parent3343fabf7984cad8781b7163f16688456deb9ca0 (diff)
This now contains the "guts" of BuildActiveThorns.pl which is
now pretty empty. Perhaps there is a better way to do this. git-svn-id: http://svn.cactuscode.org/flesh/trunk@628 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/MakeUtils.pl')
-rw-r--r--lib/sbin/MakeUtils.pl85
1 files changed, 85 insertions, 0 deletions
diff --git a/lib/sbin/MakeUtils.pl b/lib/sbin/MakeUtils.pl
new file mode 100644
index 00000000..b9f701a0
--- /dev/null
+++ b/lib/sbin/MakeUtils.pl
@@ -0,0 +1,85 @@
+
+
+#/*@@
+# @routine buildthorns
+# @date Tue Jan 19 14:02:07 1999
+# @author Tom Goodale
+# @desc
+# Creates an ActiveThornsList
+# @enddesc
+# @version $Id$
+#@@*/
+
+sub buildthorns
+{
+ local($package_dir,$choice) = @_;
+
+ chdir $package_dir || die "Can't change directory to $package_dir";
+
+ open(PACKAGES, "ls|");
+
+ while(<PACKAGES>)
+ {
+ chop;
+
+ # Ignore CVS and backup stuff
+ next if (m:^CVS$:);
+ next if (m:^\#:);
+ next if (m:~$:);
+ next if (m:\.bak$:i);
+ next if (m:^\.:);
+
+ # Just pick directories
+ if( -d $_)
+ {
+ push (@packages, $_);
+ }
+ }
+
+ close PACKAGES;
+
+ if ($choice =~ "thorns")
+ {
+
+ foreach $package (@packages)
+ {
+ chdir $package;
+
+ open(THORNLIST, "ls|");
+
+ while(<THORNLIST>)
+ {
+ chop;
+
+ # Ignore CVS and backup stuff
+ next if (m:^CVS$:);
+ next if (m:^\#:);
+ next if (m:~$:);
+ next if (m:\.bak$:i);
+ next if (m:^\.:);
+
+ # Allow each package to have a documentation directory.
+ next if (m:^doc$:);
+
+ # Just pick directories
+ if( -d $_)
+ {
+ push(@total_list, "$package/$_");
+ }
+ }
+ chdir "..";
+ }
+
+ }
+ else
+ {
+ @total_list = @packages;
+ }
+
+ foreach $thorn (@total_list)
+ {
+ print "$thorn\n";
+ }
+}
+
+1;