Hash :
d8ed72d7
Author :
Thomas de Grivel
Date :
2023-02-13T23:32:29
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#!/bin/sh
logs2html () {
for F in ~/"www/log/${SHPKG_TARGET}/${SHPKG_REPO}".*.log; do
if ! [ -f "$F.html" ]; then
ansi2html "$F"
fi
done
}
if [ "x${CC}" = "x" ]; then
if which cc >/dev/null; then
CC=cc
elif which gcc >/dev/null; then
CC=gcc
elif which egcc >/dev/null; then
CC=egcc
else
err 1 "C compiler not found."
fi
fi
SHPKG_TARGET="$(LC_ALL=C.UTF-8 ${CC} -v 2>&1 | grep '^Target: ' | head -n 1 | cut -c 9-)"
if ! [ -d ~/"www/log/${SHPKG_TARGET}" ]; then
mkdir -p ~/"www/log/${SHPKG_TARGET}"
fi
for SHPKG_REPO; do
export SHPKG_DIR=~/"shpkg_${SHPKG_REPO}"
if ! [ -d "${SHPKG_DIR}" ]; then
shpkg_bootstrap
fi
( . ~/"shpkg_${SHPKG_REPO}/etc/shpkg/profile"
shpkg upgrade "${SHPKG_REPO}"
cp ~/"shpkg_${SHPKG_REPO}/var/log/shpkg/tags/${SHPKG_REPO}".*.log ~/"www/log/${SHPKG_TARGET}/"
logs2html
shpkg_bootstrap -f ~/"shpkg_${SHPKG_REPO}"; )
( . ~/"shpkg_${SHPKG_REPO}/etc/shpkg/profile"
shpkg install "${SHPKG_REPO}"
cp ~/"shpkg_${SHPKG_REPO}/var/log/shpkg/tags/${SHPKG_REPO}".*.log ~/"www/log/${SHPKG_TARGET}"
logs2html; )
done