#!/bin/sh PATH=/bin:/usr/bin DESTDIR=$1 PREFIX=$2 DISTDIR=$3 BINDIR=bin LIBDIR=lib/rt2_demo set -e mkdir -p ${DESTDIR}${PREFIX}/${LIBDIR}/ SKIP=`strings ${DISTDIR}/rt2-demo.run | head -10 | grep ^skip= | cut -d= -f2` tail +$SKIP ${DISTDIR}/rt2-demo.run | \ tar -C ${DESTDIR}${PREFIX}/${LIBDIR}/ -xz -f - --exclude rt2_demo --exclude rt2_demo.ppc brandelf -t Linux ${DESTDIR}${PREFIX}/${LIBDIR}/rt2_demo.x86 ln -sf ${PREFIX}/${LIBDIR}/rt2_demo.x86 ${DESTDIR}${PREFIX}/${BINDIR}/rt2_demo