Skip to content

Commit

Permalink
chore: Rename LIBDIR env var
Browse files Browse the repository at this point in the history
Rename the `TEST_LIBDIR` environment variable to `ARCH-UPDATE_LIBDIR`, which is more specific name wise (to avoid eventual conflicts) and is more generic usage wise (as it could be useful outside of `make test`, e.g. for people that want to use a custom library directory).
  • Loading branch information
Antiz96 committed Jan 17, 2025
1 parent 4b2f6c5 commit 579dd14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ version="3.4.2"
option="${1}"

# Define the directory containing libraries
if [ -n "${TEST_LIBDIR}" ]; then # Used in bats test cases for `make test`
libdir="${TEST_LIBDIR}"
if [ -n "${ARCH_UPDATE_LIBDIR}" ]; then
libdir="${ARCH_UPDATE_LIBDIR}"
elif [ -d "${XDG_DATA_HOME}/${name}/lib" ]; then
libdir="${XDG_DATA_HOME}/${name}/lib"
elif [ -d "${HOME}/.local/share/${name}/lib" ]; then
Expand Down
2 changes: 1 addition & 1 deletion test/case/basic_functions.bats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export TEST_LIBDIR="${PWD}/src/lib"
export ARCH_UPDATE_LIBDIR="${PWD}/src/lib"

@test "version" {
src/arch-update.sh --version
Expand Down

0 comments on commit 579dd14

Please sign in to comment.