From: Michael Orlitzky Date: Mon, 9 Mar 2026 12:54:39 +0000 (-0400) Subject: .octaverc: don't hard-code the repository path X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=7e127c86f10111f8254c0d5219f34526e9c51ac3;p=octave.d.git .octaverc: don't hard-code the repository path We can find the path to the repository using the path to .octaverc and canonicalize_file_name(). --- diff --git a/.octaverc b/.octaverc index 1dbc33c..2b5b975 100644 --- a/.octaverc +++ b/.octaverc @@ -5,6 +5,9 @@ history_timestamp_format_string("%%-- %D %I:%M %p --%%"); page_screen_output(false); print_empty_dimensions(false); -addpath(genpath('~/src/octave')); -addpath(genpath('~/src/octave/misc')); -addpath(genpath('~/src/octave/optimization')); +## Add the repository to Octave's load path. +repository = fileparts(canonicalize_file_name(mfilename('fullpath'))); +addpath(repository); +addpath(fullfile(repository, "iterative")); +addpath(fullfile(repository, "misc")); +addpath(fullfile(repository, "optimization"));