diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dd38713 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +V:=$(shell grep -F "IOSEVKA_VERSION=" build-iosevka-prog-font.sh | sed 's/.*=//') +TOP_DIR:=$(shell pwd) +BUILD_DIR:=$(TOP_DIR)/dist + +all: + ./build-iosevka-prog-font.sh + +dist: $(BUILD_DIR)/iosevka-prog-$(V).tar.xz + +$(BUILD_DIR)/iosevka-prog-$(V).tar.xz: $(BUILD_DIR)/iosevka-prog/ttf/*.ttf + cd $(BUILD_DIR)/iosevka-prog/ttf; tar Jcf $(BUILD_DIR)/iosevka-prog-$(V).tar.xz *.ttf + +upload: dist + git tag $(V) + tea r c --repo f1x1t/iosevka-prog-font-builder -t $(V) --tag $(V) \ + -a $(BUILD_DIR)/iosevka-prog-$(V).tar.xz + git tag -d $(V) + git push + +clean: + rm -rf $(BUILD_DIR) + diff --git a/build-iosevka-prog-font.sh b/build-iosevka-prog-font.sh index 58ce03d..1314c4c 100755 --- a/build-iosevka-prog-font.sh +++ b/build-iosevka-prog-font.sh @@ -2,7 +2,7 @@ set -e -IOSEVKA_VERSION="17.0.2" +IOSEVKA_VERSION=17.0.4 FONT_NAME=iosevka-prog FILE=$( readlink -f "${BASH_SOURCE[0]}" ) DIR=$( dirname "${FILE}" ) @@ -17,11 +17,11 @@ if [ -r "${CONFIG}" ]; then docker run -e FONT_VERSION="${IOSEVKA_VERSION}" -it -v "$DIR":/build avivace/iosevka-build -- ttf::${FONT_NAME} sudo chown -R "$(id -u)":"$(id -g)" "${DIST}" mkdir -p "${OBLIQUE}" - cp "${OUT_DIR}/${FONT_NAME}-oblique.ttf" "${OBLIQUE}" - docker run -v "${OBLIQUE}":/in -v "${OUT_DIR}":/out nerdfonts/patcher --complete --careful --adjust-line-height + cp -af "${OUT_DIR}/${FONT_NAME}-oblique.ttf" "${OBLIQUE}" + docker run -v "${OBLIQUE}":/in -v "${OUT_DIR}":/out nerdfonts/patcher --complete --careful --adjust-line-height && true mkdir -p "${REGULAR}" - cp "${OUT_DIR}/${FONT_NAME}-regular.ttf" "${REGULAR}" - docker run -v "${REGULAR}":/in -v "${OUT_DIR}":/out nerdfonts/patcher --complete --careful --adjust-line-height --mono --removeligatures + cp -af "${OUT_DIR}/${FONT_NAME}-regular.ttf" "${REGULAR}" + docker run -v "${REGULAR}":/in -v "${OUT_DIR}":/out nerdfonts/patcher --complete --careful --adjust-line-height --mono --removeligatures && true else echo "Docker executable not found" fi