PATH=/usr/sbin:/usr/bin:/sbin:/bin
echo ===BEGIN===
patch.patch --version 2>&1 | head -1
brintos-selftest patch 2>&1
echo SELFTEST_RC=$?
echo ===END===
poweroff -f
PATH=/usr/sbin:/usr/bin:/sbin:/bin
echo ===BEGIN===
ls -l /usr/bin/brintos-selftest
head -1 /usr/bin/brintos-selftest
sh /usr/bin/brintos-selftest patch 2>&1; echo RUNNER_RC=$?
echo ---direct---
cd /tmp
printf %b "line one\nline two\nline three\n" > orig
printf %b "line one\nline 2\nline three\n" > new
busybox diff -u orig new > d.patch; echo diffrc=$?
patch.patch -o out orig d.patch; echo APPLYRC=$?
cat out
cmp -s new out; echo CMPRC=$?
patch.patch -R -o rev new d.patch; echo REVRC=$?
cmp -s orig rev; echo REVCMPRC=$?
echo ===END===
brintos-selftest ed
brintos-selftest dpkg
ls
