File: PKG_ADD

package info (click to toggle)
octave-ocs 0.1.5-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 640 kB
  • sloc: cpp: 435; objc: 106; makefile: 13
file content (21 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dirlist = {"utl", "asm", "tst", "nls", "prs", "sbn"};
dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
dirname = sprintf ("%s%s",
                   dirname (1 : strfind (dirname, "usr/lib/") - 1),
                   "usr/share/octave/packages/ocs-0.1.5/");

if (! exist (fullfile (dirname, "inst"), "dir"))
  ## Run this if the package is installed
  for ii=1:length (dirlist)
    addpath (fullfile (dirname, dirlist{ii}), "-end")
  endfor
else
  ## Run this if we are testing the package without installation
  for ii=1:length(dirlist)
    addpath (fullfile (dirname, "inst", dirlist{ii}))
    addpath (fullfile (dirname, "src"))
  endfor
endif

warning ("off", "Octave:fopen-file-in-path");
clear dirlist dirname