loksh-noxz

[fork] a Linux port of OpenBSD's ksh
git clone https://noxz.tech/git/loksh-noxz.git
Log | Files | README

ci.sh
1#!/bin/sh -xe
2
3meson --buildtype=release --prefix=/usr build
4DESTDIR=../dst ninja -C build install
5./dst/usr/bin/ksh -c "kill -l"
6[ "`echo 'kill -l 9' | ./dst/usr/bin/ksh`" != KILL ] && exit 1
7[ -n "`./dst/usr/bin/ksh -c 'echo &' 2>&1 | grep 'internal error'`" ] && exit 1
8[ "`./dst/usr/bin/ksh -c 'echo $((1337 * 2))'`" -ne 2674 ] && exit 1
9[ "`./dst/usr/bin/ksh -c 'seq 1337 | sort -rn | head -n 1'`" -ne 1337 ] && exit 1
10CC=clang meson --buildtype=release build-clang
11ninja -C build-clang
12
13if [ "`readlink /proc/$$/exe`" != /tmp/ksh ]
14then
15	cp -f dst/usr/bin/ksh /tmp/
16	rm -rf build build-clang dst
17	exec /tmp/ksh -xe $0
18fi
19
20for i in arm-any32-linux-musleabi mips-any32-linux-musl
21do
22	meson --buildtype=release --cross-file=$i build-$i
23	ninja -C build-$i
24done