Skip to content

Commit

Permalink
Fixing github tests on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
spog committed Nov 24, 2024
1 parent 11af447 commit ac9d7d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
SHELL := bash
INSTALL ?= install
UNAME := $(shell uname);
REALPATH := $(shell if [ "$(UNAME)" == "Darwin" ]; then echo grealpath; else echo realpath; fi)

# Make sure we have git:
ifeq ($(shell which git),)
Expand All @@ -22,7 +24,7 @@ INSTALL_BIN ?= $(PREFIX)/bin
INSTALL_LIB ?= $(PREFIX)/share/$(NAME)
INSTALL_EXT ?= $(INSTALL_LIB)/$(NAME).d
INSTALL_MAN1 ?= $(PREFIX)/share/man/man1
LINK_REL_DIR := $(shell realpath --relative-to=$(INSTALL_BIN) $(INSTALL_LIB))
LINK_REL_DIR := $(shell $(REALPATH) --relative-to=$(INSTALL_BIN) $(INSTALL_LIB))

# Docker variables:
DOCKER_TAG ?= 0.0.6
Expand All @@ -49,6 +51,7 @@ help:

.PHONY: test
test:
@echo UNAME: '$(UNAME)'
prove $(prove) $(test)

test-all: test docker-tests
Expand Down
3 changes: 2 additions & 1 deletion lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ set -e
export FILTER_BRANCH_SQUELCH_WARNING=1

# Import Bash+ helper functions:
SUBREPO_EXT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")/git-subrepo.d" # replaced by `make install`
REALPATH=$(if [ "$(uname)" == "Linux" ]; then echo realpath; else echo grealpath; fi)
SUBREPO_EXT_DIR="$(dirname "$($REALPATH "${BASH_SOURCE[0]}")")/git-subrepo.d" # replaced by `make install`
source "${SUBREPO_EXT_DIR}/bash+.bash"
bash+:import :std can version-check

Expand Down
4 changes: 3 additions & 1 deletion test/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

set -e

export LC_ALL=C.UTF-8
if [ "$(uname)" == "Linux" ]; then
export LC_ALL=C.UTF-8
fi

# Get the location of this script
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
Expand Down

0 comments on commit ac9d7d1

Please sign in to comment.