From 75a66ba00cbff5a55be51e626219d06c70a55d0e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 30 May 2017 23:28:51 +0200 Subject: build: remove shell based self contained executable --- GNUmakefile | 6 --- shar.sh | 120 ------------------------------------------------------------ 2 files changed, 126 deletions(-) delete mode 100755 shar.sh diff --git a/GNUmakefile b/GNUmakefile index 3e6b586..963ae57 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -255,10 +255,4 @@ standalone: clean CFLAGS="-I$(DEPS_INC) --static -Wl,--as-needed" LDFLAGS="-L$(DEPS_LIB)" CC=musl-gcc PATH=$(DEPS_BIN):$$PATH $(MAKE) -single: standalone - for e in $(ELF); do \ - ${STRIP} "$$e"; \ - done - ./shar.sh vis-single $(EXECUTABLES) $$(find lua -name '*.lua') - .PHONY: standalone local dependencies-common dependencies-local dependencies-clean diff --git a/shar.sh b/shar.sh deleted file mode 100755 index c7a532c..0000000 --- a/shar.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh -# Modified version of https://shiz.me/junk/code/fun/shar.sh -# The generated shell archive is automatically extracted to a -# temporary directory and the first archive member is executed. -set -e - -if test $# -lt 2 ; then - echo "usage: $0 " - exit 1 -fi - -save() { - for i ; do - printf "%s\n" "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" - done - echo " " -} - -octal_mode() { - local mode - - mode="$(ls -ld "$1" | awk '{ print $1 }' | tr '[A-Z]' '-' | cut -c2-)" - for i in 1 2 3 ; do - i=0 - case "$mode" in r??*) i=$((i + 4)) ;; esac - case "$mode" in ?w?*) i=$((i + 2)) ;; esac - case "$mode" in ??-*) ;; ???*) i=$((i + 1)) ;; esac - printf "%d" "$i" - mode=$(echo "$mode" | cut -c4-) - done -} - -out=$1 -tmpout=$1.tmp -exe=$2 -shift - -rm -f "$tmpout" -for f ; do - if test -f "$f" ; then - cat "$f" >> "$tmpout" - fi -done -trap 'rm "$tmpout"' EXIT - -clear= - -for f ; do - if test -z "$clear" ; then - set -- - clear=1 - fi - - mode=$(octal_mode "$f") - if test -f "$f" ; then - size=$(wc -c "$f" | awk '{ print $1 }') - echo "adding: $f (mode $mode, $size bytes)" - set -- "$@" "f+$mode+$size:$f" - elif test -d "$f" ; then - echo "adding directory: $f (mode $mode)" - set -- "$@" "d+$mode:$f" - else - echo "can't add unknown file type $f" >&2 - fi -done - -cat >"$out"<
/dev/null <&3 - ;; - d) - echo "creating: \$fn (mode \$mode)" - mkdir -p "\$outdir/\$fn" - ;; - esac - chmod "\$mode" "\$outdir/\$fn" || : -done >/dev/null 2>&1 - -PATH="\$outdir:\$PATH" "\$outdir/$exe" "\$@" -exit \$? - -exit 0; -HEADER - -cat "$tmpout" >> "$out" -chmod +x "$out" - -- cgit v1.2.3