add packaging
This commit is contained in:
parent
0308d61ba5
commit
00d858f60e
|
@ -4,3 +4,5 @@
|
|||
.DS_Store
|
||||
compiled/
|
||||
/doc/
|
||||
/dist/
|
||||
/meowbb
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
.PHONY: all dist
|
||||
|
||||
RKT_VER=$(shell racket -e "(displayln (version))")
|
||||
|
||||
all:
|
||||
@echo nothing to do...
|
||||
|
||||
dist:
|
||||
mkdir -p dist
|
||||
raco exe -o meowbb main.rkt
|
||||
raco dist dist meowbb
|
||||
rm meowbb
|
||||
cp ~/.racket/$(RKT_VER)/lib/lib{racket_unix_signals,tty_raw}.so dist/lib
|
||||
./mkhaskalimage.sh dist bin/meowbb meowbb
|
|
@ -5,16 +5,25 @@ probably out of date demo: https://asciinema.org/a/jUw0GtaIsqZdAxTDkBRAiV2L3
|
|||
you'll need uhhhhhhhhhhhhhh fixed libraries
|
||||
|
||||
```
|
||||
git clone https://git.lain.faith/misc-deps/racket-unix-signals
|
||||
cd racket-unix-signals
|
||||
raco pkg install unix-signals/
|
||||
cd ..
|
||||
|
||||
git clone https://git.lain.faith/misc-deps/racket-ansi
|
||||
cd racket-ansi
|
||||
raco pkg install ansi/
|
||||
cd ..
|
||||
|
||||
git clone https://git.lain.faith/misc-deps/lux
|
||||
cd lux
|
||||
raco pkg install
|
||||
cd ..
|
||||
|
||||
git clone https://git.lain.faith/misc-deps/raart
|
||||
cd raart
|
||||
raco pkg install
|
||||
cd ..
|
||||
```
|
||||
|
||||
ok now we're ready to do stuff
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
echo "usage: ./mkhaskalimg.sh <dir> <cmd> <out>"
|
||||
fi
|
||||
|
||||
dir="$1"
|
||||
cmd="$2"
|
||||
out="$3"
|
||||
|
||||
(cd "$dir" && tar czf ../haskalimg.tar.gz *)
|
||||
|
||||
header=$(cat <<EOF
|
||||
#!/bin/bash
|
||||
extdir="/tmp/haskalimg-\$(whoami)-\$(head -c8 /dev/urandom | xxd -p)"
|
||||
mkdir "\$extdir"
|
||||
tail -n +11 "\$0" | tar xz -C "\$extdir"
|
||||
function finish {
|
||||
rm -rf "\$extdir"
|
||||
}
|
||||
trap finish EXIT
|
||||
\$extdir/$2
|
||||
exit
|
||||
EOF
|
||||
)
|
||||
|
||||
cat <(echo "$header") haskalimg.tar.gz > "$out"
|
||||
rm haskalimg.tar.gz
|
||||
chmod +x "$out"
|
Loading…
Reference in New Issue