From 95c17d0bc5c2104d1922c29c298c147c2eca1fe4 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Fri, 9 Oct 2020 22:55:10 +0200 Subject: [PATCH 1/3] Make shell redirections in Makefile work with dash The default shell in Debian is dash and it doesn't support &>. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4b46d46..0f83570 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ test: cd /yadm && \ py.test -v $(testargs); \ else \ - if command -v "docker-compose" &> /dev/null; then \ + if command -v "docker-compose" > /dev/null 2>&1; then \ docker-compose run --rm testbed make test testargs="$(testargs)"; \ else \ echo "Sorry, this make test requires docker-compose to be installed."; \ @@ -197,7 +197,7 @@ sync-clock: .PHONY: require-docker require-docker: - @if ! command -v "docker" &> /dev/null; then \ + @if ! command -v "docker" > /dev/null 2>&1; then \ echo "Sorry, this make target requires docker to be installed."; \ false; \ fi From 3741b92737c9c1b6d7381fd10e93d7a55c858296 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sat, 10 Oct 2020 10:12:31 +0200 Subject: [PATCH 2/3] Fix setting the default value of version in Makefile As each command in a make target is executed separately, a variable set in one command isn't available in the following commands. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0f83570..d6de052 100644 --- a/Makefile +++ b/Makefile @@ -102,8 +102,8 @@ test: fi .PHONY: testhost +testhost: version ?= HEAD testhost: require-docker - @version=HEAD @rm -rf /tmp/testhost @git show $(version):yadm > /tmp/testhost @chmod a+x /tmp/testhost @@ -117,8 +117,8 @@ testhost: require-docker bash -l .PHONY: scripthost +scripthost: version ?= HEAD scripthost: require-docker - @version=HEAD @rm -rf /tmp/testhost @git show $(version):yadm > /tmp/testhost @chmod a+x /tmp/testhost From b55ad5b525018d51eed7cc155500de503feb7881 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sat, 10 Oct 2020 10:15:41 +0200 Subject: [PATCH 3/3] Fix template conditional in man page The default template processor doesn't support single quotes. --- yadm.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yadm.1 b/yadm.1 index ee9504a..98b372b 100644 --- a/yadm.1 +++ b/yadm.1 @@ -704,7 +704,7 @@ Examples: .I whatever##template with the following content - {% if yadm.user == 'harvey' %} + {% if yadm.user == "harvey" %} config={{yadm.class}}-{{yadm.os}} {% else %} config=dev-whatever