summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-04-20 17:15:01 +0100
committerdavidovski <david@davidovski.xyz>2022-04-20 17:15:01 +0100
commit1f64e717bd8740ee1061e9d85b2914abaaecf8e8 (patch)
tree3a4e60e5b4a1dbb9506bc6adc4855d2545cc5eeb
parent452569e48456f1876fcb96b6e1f03a7118b91f6c (diff)
fixed testsv1.2.4
-rwxr-xr-xMakefile31
-rw-r--r--src/shtests.sh3
-rwxr-xr-xtest/parseconf.sh2
3 files changed, 23 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 56e4a9d..20f829b 100755
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ DIST=dist
install: install-hbar install-colors install-parseconf install-shtests install-glyphs
check: check-parseconf
-build: make-dist build-hbar
+build: make-dist hbar shtests parseconf colors
make-dist:
mkdir -p ${DIST}
@@ -18,13 +18,13 @@ make-dist:
install-headers: src/*.h
install -Dm644 src/*.h ${DESTDIR}${PREFIX}/include
-install-shtests: src/shtests.sh
- install -Dm755 src/shtests.sh ${DESTDIR}${PREFIX}/bin/shtests
+install-shtests: shtests
+ install -Dm755 ${DIST}/shtests ${DESTDIR}${PREFIX}/bin/shtests
-install-parseconf: src/parseconf.sh
- install -Dm755 src/parseconf.sh ${DESTDIR}${PREFIX}/bin/parseconf
+install-parseconf: parseconf
+ install -Dm755 ${DIST}/parseconf ${DESTDIR}${PREFIX}/bin/parseconf
-install-hbar: build-hbar
+install-hbar: hbar
install -Dm755 ${DIST}/hbar ${DESTDIR}${PREFIX}/bin
install-colors: src/colors.list
@@ -32,15 +32,24 @@ install-colors: src/colors.list
install -Dm755 ${DIST}/colors.h ${DESTDIR}${PREFIX}/include/colors.h
install-glyphs: src/glyphs.sh
- install -m755 src/glyphs.sh ${DESTDIR}${PREFIX}/lib
+ install -Dm755 src/glyphs.sh ${DESTDIR}${PREFIX}/lib
-check-parseconf: install-shtests test/parseconf.sh
- ${DESTDIR}${PREFIX}/bin/shtests ./test/parseconf.sh
-build-hbar: generate-colors src/hbar.c
+
+check-parseconf: shtests parseconf test/parseconf.sh
+ ${DIST}/shtests ./test/parseconf.sh
+
+
+hbar: colors src/hbar.c
${CC} -I${DIST} src/hbar.c -o ${DIST}/hbar ${FLAGS}
-generate-colors: src/colors.list
+shtests: src/shtests.sh
+ install -Dm755 src/shtests.sh ${DIST}/shtests
+
+parseconf: src/parseconf.sh
+ install -Dm755 src/parseconf.sh ${DIST}/parseconf
+
+colors: src/colors.list
sh src/generate_colors.sh ${DIST}/ src/colors.list
clean:
diff --git a/src/shtests.sh b/src/shtests.sh
index 70dc21b..a899f3c 100644
--- a/src/shtests.sh
+++ b/src/shtests.sh
@@ -9,7 +9,8 @@
# shtests [FILE]
#
-. /usr/lib/colors.sh
+[ -f /usr/lib/colors.sh ] && . /usr/lib/colors.sh
+[ -f colors.sh ] && . colors.sh
PASS="${BLUE}[ ${GREEN}PASS${BLUE} ]${RESET}"
FAIL="${BLUE}[ ${RED}FAIL${BLUE} ]${RESET}"
diff --git a/test/parseconf.sh b/test/parseconf.sh
index 0a87188..ab28721 100755
--- a/test/parseconf.sh
+++ b/test/parseconf.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-PARSECONF="./src/parseconf.sh"
+PARSECONF="./dist/parseconf"
SIMPLECONF="./test/simple.conf"
test_simple_loading () {