octave-pkgbuilddir
authorDebian Octave Group <team+pkg-octave-team@tracker.debian.org>
Thu, 31 Oct 2019 00:51:03 +0000 (00:51 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 31 Oct 2019 00:51:03 +0000 (00:51 +0000)
Gbp-Pq: Name octave-pkgbuilddir.patch

scripts/pkg/private/install.m

index ecdbd8eb5f880458775c4d9635ebdb432360e311..b73309315c5fd95bd90b3402bcaa56d39edc97a0 100644 (file)
@@ -62,7 +62,10 @@ function install (files, handle_deps, prefix, archprefix, verbose,
     for i = 1:length (files)
       tgz = files{i};
 
-      if (exist (tgz, "file"))
+      ## The filename pointed to an uncompressed package to begin with.
+      if (isfolder (tgz))
+        dirlist = {".", "..", tgz};
+      elseif (exist (tgz, "file"))
         ## Create a temporary directory.
         tmpdir = tempname ();
         tmpdirs{end+1} = tmpdir;
@@ -91,17 +94,16 @@ function install (files, handle_deps, prefix, archprefix, verbose,
         endif
       endif
 
-      ## The filename pointed to an uncompressed package to begin with.
-      if (isfolder (tgz))
-        dirlist = {".", "..", tgz};
-      endif
-
-      if (exist (tgz, "file") || isfolder (tgz))
+      if (exist (tgz, "file"))
         ## The two first entries of dirlist are "." and "..".
-        if (exist (tgz, "file"))
-          packdir = fullfile (tmpdir, dirlist{3});
+        if (exist (tgz, "dir"))
+          if (tgz(1) == '/')
+            packdir = tgz;
+          else
+            packdir = fullfile (pwd (), dirlist{3});
+          endif
         else
-          packdir = fullfile (pwd (), dirlist{3});
+          packdir = fullfile (tmpdir, dirlist{3});
         endif
         packdirs{end+1} = packdir;