From 7a4e7809358548e24a5debb375e6e6a368247f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Aug 2018 12:42:30 +0200 Subject: autopkg: move it back --- autopkg-head.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 autopkg-head.mk (limited to 'autopkg-head.mk') diff --git a/autopkg-head.mk b/autopkg-head.mk new file mode 100644 index 0000000..115e1ae --- /dev/null +++ b/autopkg-head.mk @@ -0,0 +1,21 @@ +ifndef AUTOPKG_VARIANT + $(error "Don't include autopkg-head.mk directly!") +endif + +ifndef PKG_NAME +$(error You have to define PKG_NAME before pkgauto.mk include) +endif +ifndef PKG_SOURCE_URL +$(error You have to define PKG_SOURCE_URL before pkgauto.mk include) +endif + +TMP_REPO_PATH=$(DL_DIR)/autopkg/$(PKG_NAME) +GIT_ARGS=--git-dir='$(TMP_REPO_PATH)' --bare + +# Clone/update git history to bare repository +$(shell \ + if [ ! -d "$(TMP_REPO_PATH)" ]; then \ + git clone --mirror "$(PKG_SOURCE_URL)" "$(TMP_REPO_PATH)"; \ + else \ + git $(GIT_ARGS) remote update origin; \ + fi) -- cgit v1.2.3 From 9e6b567ec2c7eca1b0299b048c9f1872857b6579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Aug 2018 12:54:03 +0200 Subject: shellrc: fix --- autopkg-head.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autopkg-head.mk') diff --git a/autopkg-head.mk b/autopkg-head.mk index 115e1ae..a61c964 100644 --- a/autopkg-head.mk +++ b/autopkg-head.mk @@ -13,9 +13,9 @@ TMP_REPO_PATH=$(DL_DIR)/autopkg/$(PKG_NAME) GIT_ARGS=--git-dir='$(TMP_REPO_PATH)' --bare # Clone/update git history to bare repository -$(shell \ +$(info $(shell \ if [ ! -d "$(TMP_REPO_PATH)" ]; then \ git clone --mirror "$(PKG_SOURCE_URL)" "$(TMP_REPO_PATH)"; \ else \ git $(GIT_ARGS) remote update origin; \ - fi) + fi)) -- cgit v1.2.3