From 7e127c86f10111f8254c0d5219f34526e9c51ac3 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 9 Mar 2026 08:54:39 -0400 Subject: [PATCH] .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(). --- .octaverc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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")); -- 2.51.0