From a8e01f20481e464757e8147a4b2cd3a1ce811086 Mon Sep 17 00:00:00 2001 From: Kevin Dorner Date: Fri, 13 Nov 2020 21:47:54 +0100 Subject: [PATCH] Fixed and improved Makefile --- Makefile | 18 +++++++++++------- remove.ins | 1 - 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7d70334..a556be5 100644 --- a/Makefile +++ b/Makefile @@ -2,24 +2,28 @@ UPSTREAM_VERSION = 2.29.2.2 PKG_SUB_RELEASE = 1.0 PKG_FULL_VERSION = ${UPSTREAM_VERSION}-${PKG_SUB_RELEASE} -UPSTREAM_TAG = "v$(echo $UPSTREAM_VERSION | cut -d. -f-3).windows.$(echo $UPSTREAM_VERSION | cut -d. -f4)" +UPSTREAM_TAG = "v$$(echo ${UPSTREAM_VERSION} | cut -d. -f-3).windows.$$(echo ${UPSTREAM_VERSION} | cut -d. -f4)" SOURCE = https://github.com/git-for-windows/git/releases/download/${UPSTREAM_TAG}/Git-${UPSTREAM_VERSION}-64-bit.exe -CHECKSUM = 0a88d826cd4c66d949c054f5830667896fae44fcb29c1698f7ed984df8765029 +CHECKSUM = 9ab49d93166d430514b0aaf6dda3fdc6b37e2fe1d0df8ecc04403cd2be40e78b ## Download Link and Checksums can be found on https://github.com/git-for-windows/git/releases/ -install: clean setversion +all: clean setversion install + +install: setversion @[ -d "./data/" ] || mkdir ./data/ - @echo "Downloading the Git for Windows executable..." + @echo "INFO: Downloading the Git for Windows executable..." @wget -O ./data/Git-${UPSTREAM_VERSION}-64-bit.exe ${SOURCE} - @echo "${CHECKSUM} ./data/Git-${UPSTREAM_VERSION}-64-bit.exe" | sha256sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf ./data/; exit $$ec; } + @echo "${CHECKSUM} ./data/Git-${UPSTREAM_VERSION}-64-bit.exe" | sha256sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf ./data/ >&2; exit $$ec; } + @echo "SUCCESS: Installed Successfully" clean: - @echo "Cleaning ./data/" + @echo "INFO: Cleaning ./data/" @rm -rf ./data/ + @[ ! -d "./data/" ] && echo "SUCCESS: Cleaned" setversion: - @echo "Writing version ${PKG_FULL_VERSION} to control file" + @echo "INFO: Writing version ${PKG_FULL_VERSION} to control file" @sed -i "s/^version: [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$$/version: ${UPSTREAM_VERSION}/" ./control @sed -i "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: ${PKG_SUB_RELEASE}/" ./control package: diff --git a/remove.ins b/remove.ins index 58aee57..de8478d 100644 --- a/remove.ins +++ b/remove.ins @@ -31,7 +31,6 @@ endif [WinBatch_Setup] $UninstallExecutablePath$ /VERYSILENT /SUPPRESSMSGBOXES /LOG="%opsiLogDir%\git-client-uninstall.log" - [Files_Cleanup] delete -sf "%ProgramFilesDir%\Git\"