]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/common.pm
Bump the API revision for the previous commit.
[user/henk/code/inspircd.git] / make / common.pm
index f0174e0b3bd8ab79b7af95a79c924001417d9ead..ba6b03f87d4472d19640e98021c0f3114578cd38 100644 (file)
@@ -37,8 +37,7 @@ our @EXPORT = qw(create_directory
                  get_cpu_count
                  get_version
                  read_config_file
-                 write_config_file
-                 module_installed);
+                 write_config_file);
 
 sub create_directory($$) {
        my ($location, $permissions) = @_;
@@ -60,7 +59,7 @@ sub get_version {
 
        # Attempt to retrieve missing version information from Git
        chomp(my $gr = `git describe --tags 2>/dev/null`);
-       if ($gr =~ /^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\d+-g(\w+))?$/) {
+       if ($gr =~ /^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:[a-z]+\d+)?(?:-\d+-g(\w+))?$/) {
                $version{MAJOR} //= $1;
                $version{MINOR} //= $2;
                $version{PATCH} //= $3;
@@ -90,12 +89,6 @@ sub get_version {
        return %version;
 }
 
-sub module_installed($) {
-       my $module = shift;
-       eval("use $module;");
-       return !$@;
-}
-
 sub get_cpu_count {
        my $count = 1;
        if ($^O =~ /bsd/) {