[Pkg-octave-commit] [octave-pkg-dev] 01/03: check-pkg: Add function for creating directories
Rafael Laboissiere
rafael at debian.org
Thu Aug 31 20:33:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
rafael pushed a commit to branch master
in repository octave-pkg-dev.
commit d8b8aeb5c06026387b6f7f0dd25266626d5e6bf3
Author: Rafael Laboissiere <rafael at debian.org>
Date: Thu Aug 31 17:12:26 2017 -0300
check-pkg: Add function for creating directories
---
make-octave-forge-debpkg.in | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/make-octave-forge-debpkg.in b/make-octave-forge-debpkg.in
index 3d808e0..4438d11 100755
--- a/make-octave-forge-debpkg.in
+++ b/make-octave-forge-debpkg.in
@@ -98,6 +98,12 @@ sub croak ($) {
### The pkgdata hash will store the data in the DESCRIPTION file
my %pkgdata;
+### Function for creating a directory if it does not exist yet
+sub makedir ($) {
+ my $dir = shift;
+ -d $dir or mkdir $dir;
+}
+
### Check whether a given field exists in the DESCRIPTION file and exit the
### program with an error message, in the case the field does not exist
sub check ($) {
@@ -126,7 +132,7 @@ my $title = $pkgdata{Title};
my $architecture = -d "src" ? "any" : "all";
### Create the debian/ directory, if it does not exist.
--d "debian" or mkdir "debian";
+makedir "debian";
### Create the debian/compat file.
my $compat = #Compat#;
@@ -205,7 +211,7 @@ Description: $title
close FID;
### Create the debian/source/format file.
--d "debian/source" or mkdir "debian/source";
+makedir "debian/source";
open (FID, "> debian/source/format");
print FID "3.0 (quilt)\n";
close FID;
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-pkg-dev.git
More information about the Pkg-octave-commit
mailing list