From 32920b337ac9381fda5ae1b5ac539df79d3daec0 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 13 Apr 2020 20:22:02 +0530 Subject: change up path configuration --- INSTALL.md | 12 ++++++------ build.sh | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9ead25f..df9831d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -60,17 +60,17 @@ sudo apt install openjdk-8-jdk openjdk-8-jre python3 fontforge curl -o BitsNPicas.jar "https://github.com/kreativekorp/bitsnpicas/blob/master/downloads/BitsNPicas.jar" ``` -1. Open `build.sh` and change variable `BNP` to the full - path to the BitsNPicas `jar` file. +1. Set an environment variable `BNP` to the path of + `BitsNPicas.jar`, defaults to the current directory if + unset ```shell # for example: -export BNP="/home/nerdypepper/downloads/BitsNPicas.jar" +user@host$ BNP="/home/nerdypepper/BitsNPicas.jar" ./build.sh ``` -2. Run `build.sh` -3. If everything went well, you will find the generated font +2. If everything went well, you will find the generated font files under the `build` folder. -4. Continue with step 3 of "Install from release" +3. Continue with step 3 of "Install from release" ## Verification diff --git a/build.sh b/build.sh index 5816819..2aae83a 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -export BNP="BitsNPicas.jar" - ff_filter() { fontforge -c 'open(argv[1]).generate(argv[2])' "$1" "$2" } @@ -9,6 +7,7 @@ ff_filter() { ttf_filter() { # 1 - source file # 2 - destination file + BNP=${BNP:="./BitsNPicas.jar"} java -jar "$BNP" convertbitmap -f ttf -o "$2" "$1" } -- cgit v1.2.3