diff --git a/posix/maketi b/posix/maketin similarity index 90% rename from posix/maketi rename to posix/maketin index 44f8aca..50da448 100755 --- a/posix/maketi +++ b/posix/maketin @@ -143,7 +143,10 @@ lz4 --rm -9 -c "$DIRNAME.tar" > "$DIRNAME".tar.lz4 echo "Injecting payload..." sed s/SUM/"$(cat "$SUMFILE")"/ "$PAYLOAD_SCRIPT" | sed s/ID/"$(basename "$DIRNAME")"/ | -awk '!/^ *#/ && NF' > tpp +#awk '!/^ *#/ && NF' > tpp +sed -e '1{/^#!/ {p}}; /^[\t\ ]*#/d;/\.*#.*/ {/[\x22\x27].*#.*[\x22\x27]/ !{:regular_loop s/\(.*\)*[^\]#.*/\1/;t regular_loop}; /[\x22\x27].*#.*[\x22\x27]/ {:special_loop s/\([\x22\x27].*#.*[^\x22\x27]\)#.*/\1/;t special_loop}; /\\#/ {:second_special_loop s/\(.*\\#.*[^\]\)#.*/\1/;t second_special_loop}}' | +sed '/^$/d' > tpp + size="$(wc -c tpp | cut -d " " -f1)" strsize="$(echo "BYTES" | wc -c)"