Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Jul 29, 2024
1 parent 684e643 commit bd1e093
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL := bash

ROOT := $(shell pwd)

BIN := $(ROOT)/bin
BIN := bin

YS := $(BIN)/ys
CFGLET := $(BIN)/configlet
Expand All @@ -14,7 +14,7 @@ YS := ys
SHELLCHECK := shellcheck
endif

export PATH := $(BIN):$(PATH)
export PATH := $(ROOT)/bin:$(PATH)

EXERCISE_DIRS := $(shell find exercises -name .meta)
EXERCISE_DIRS := $(EXERCISE_DIRS:%/.meta=%)
Expand Down Expand Up @@ -146,18 +146,22 @@ $(EXERCISE_META_TESTS):
%.json: %.yaml $(YS) Makefile
$(YS) -l $< | jq > $@

$(YS):
curl -s https://yamlscript.org/install | \
PREFIX=$(ROOT) BIN=1 bash
$(CLOJURE_REPO):
git clone $(CLOJURE_REPO_URL) $@

$(CFGLET):
$(BIN)/fetch-configlet

# Dummy rule for GHA
ys shellcheck:

$(CFGLET):
$(BIN)/fetch-configlet
ifndef EXERCISM_YAMLSCRIPT_GHA
bin/ys:
curl -s https://yamlscript.org/install | \
PREFIX=$(ROOT) BIN=1 bash

ifeq (,$(wildcard $(SHELLCHECK)))
$(SHELLCHECK): $(SHELLCHECK_DIR)
bin/shellcheck: $(SHELLCHECK_DIR)
mv $</shellcheck $@
touch $@
$(RM) -r $<
Expand All @@ -169,6 +173,4 @@ $(SHELLCHECK_DIR): $(SHELLCHECK_TAR)

$(SHELLCHECK_TAR):
wget --quiet $(SHELLCHECK_RELEASE)

$(CLOJURE_REPO):
git clone $(CLOJURE_REPO_URL) $@
endif

0 comments on commit bd1e093

Please sign in to comment.