diff options
author | davidovski <david@davidovski.xyz> | 2022-07-18 12:57:12 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-07-18 12:57:12 +0100 |
commit | b0ef6bc7d3971afb48ebd5becf56737256f2aed5 (patch) | |
tree | 9a3f07cb47d0ebedaad1819c67345d740e83b02f /src | |
parent | d928a64d382cbed095ad7748e09facc9610a1775 (diff) |
fixed building shmkv1.8
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/xitui.sh | 2 | ||||
-rwxr-xr-x | src/util/shmk.sh | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/xitui.sh b/src/lib/xitui.sh index dcfaf02..bd23bdc 100644 --- a/src/lib/xitui.sh +++ b/src/lib/xitui.sh @@ -24,7 +24,7 @@ #███████ ███████ ███████ ███████ ███████ ███████ ███████ ███████# ################################################################# -. /usr/lib/colors.sh +#include colors COLOR_FG=${WHITE} COLOR_FG2=${LIGHT_BLUE} diff --git a/src/util/shmk.sh b/src/util/shmk.sh index 0174857..a7b0d37 100755 --- a/src/util/shmk.sh +++ b/src/util/shmk.sh @@ -27,10 +27,18 @@ find_file () { } parse_lines () { + included="" while IFS= read -r line; do case "$line" in "#include "*) - cat $(find_file ${line#\#include}) | parse_lines + file="$(find_file ${line#\#include})" + case "$included" in + *"$file"*) + ;; + *) + cat $file | parse_lines + included="$included $file" + esac ;; "#>"*) eval ${line#'#>'} @@ -50,7 +58,7 @@ build_shmk () { [ -f "$1" ] || return 1 [ ! -z "$2" ] && output="$2" [ -z "$output" ] && output=$(basename $1) - output=${output%.*} + output=./${output%.*} $clean && { rm -f $output @@ -91,7 +99,7 @@ interpret_shmk () { lib=$(basename $lib) lib="${lib%.*}" cmdlist="$cmdlist - install -Dm755 $DIST/$lib ${DESTDIR}/${PREFIX}/lib/$lib #Install library $lib" + install -Dm755 $DIST/$lib ${DESTDIR}/${PREFIX}/lib/$lib.sh #Install library $lib" done ;; clean) |