summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--planr-cfg16
1 files changed, 8 insertions, 8 deletions
diff --git a/planr-cfg b/planr-cfg
index c5d3f1e..dba9683 100644
--- a/planr-cfg
+++ b/planr-cfg
@@ -176,13 +176,13 @@ add_unit() {
local testfile
local name
- name="$(basename $pathspec)"
- name="$(uppercase_str $name)"
+ local base
+ base="$(basename $pathspec)"
+ name="$(uppercase_str $base)"
unitdef="${pathspec}.toml"
- testfile="$(test_dir)/$pathspec"
-
+ testfile="$(test_dir)/$base"
if [[ "$fmt" = "cpp" ]]; then
testfile="${testfile}.cpp"
@@ -191,13 +191,13 @@ add_unit() {
else
die "Format not recognized \"${fmt}\""
fi
-
- create_with_subdirs "$unitdef"
- create_with_subdirs "$testfile"
-
+
local unitdef_abs
unitdef_abs="$(rubric_dir)/${unitdef}"
+ create_with_subdirs "$unitdef_abs"
+ create_with_subdirs "$testfile"
+
if [[ "$fmt" = "cpp" ]]; then
cpp_unitdef "$unitdef" "$name" >"$unitdef_abs"
cpp_boilerplate "$name" >"$testfile"