Add check to Makefile for scripts version mismatch

This commit is contained in:
Jiří Štefka 2023-02-27 02:20:54 +01:00
parent a28a24c053
commit cd7ec87178
2 changed files with 13 additions and 8 deletions

@ -1,15 +1,20 @@
# Simple makefile to create a tarball of the msman helper scripts # Simple makefile to create a tarball of the msman helper scripts
# Turn off verbose mode
MAKEFLAGS += -s
all: all:
source msman.sh CURRENT_SCRIPT_VERSION=`grep "CURRENT_SCRIPT_VERSION=" msman.sh | sed -e "s/CURRENT_SCRIPT_VERSION=//g"`; \
source .msman/version.sh EXTRA_VERSION=`grep "EXTRA_SCRIPTS_VERSION=" .msman/version.sh | sed -e "s/EXTRA_SCRIPTS_VERSION=//g"`; \
if [[ $CURRENT_SCRIPT_VERSION == $EXTRA_SCRIPTS_VERSION]]; then if [ "$$CURRENT_SCRIPT_VERSION" != "$$EXTRA_VERSION" ]; then \
cp -r .msman msman echo "ERROR: The version in msman.sh and .msman/version.sh are not the same!"; \
tar -czf msman-hepler.tar.gz msman echo "ERROR: Please make sure they are the same."; \
rm -rf msman exit 1; \
else
echo "msman.sh and .msman/version.sh are not in sync"
fi fi
rm -rf msman
mkdir msman
cp -r .msman msman
tar -czf msman-hepler.tar.gz msman
rm -rf msman
clean: clean:
rm -rf msman rm -rf msman

Binary file not shown.