73 lines
2.0 KiB
Bash
Executable File
73 lines
2.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
|
# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space>
|
|
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set -ex
|
|
|
|
PATH=/${ARCH_DIR}/bin
|
|
|
|
# Set commonly used variables
|
|
sysa=/sysa
|
|
distfiles=/sysa/distfiles
|
|
prefix=/usr
|
|
bindir=${prefix}/bin
|
|
libdir=${prefix}/lib
|
|
incdir=${prefix}/include
|
|
srcdir=${prefix}/src
|
|
TMPDIR=/tmp # tmpdir is needed for patch to work
|
|
|
|
mkdir -p ${prefix} ${bindir} ${libdir} ${incdir} ${srcdir} ${TMPDIR}
|
|
|
|
# Remove remaining dependencies on /bin (stage0-posix directory)
|
|
cp /${ARCH_DIR}/bin/blood-elf ${bindir}/blood-elf
|
|
cp /${ARCH_DIR}/bin/catm ${bindir}/catm
|
|
cp /${ARCH_DIR}/bin/chmod ${bindir}/chmod
|
|
cp /${ARCH_DIR}/bin/get_machine ${bindir}/get_machine
|
|
cp /${ARCH_DIR}/bin/hex2 ${bindir}/hex2
|
|
cp /${ARCH_DIR}/bin/kaem ${bindir}/kaem
|
|
cp /${ARCH_DIR}/bin/match ${bindir}/match
|
|
cp /${ARCH_DIR}/bin/M1 ${bindir}/M1
|
|
cp /${ARCH_DIR}/bin/M2-Mesoplanet ${bindir}/M2-Mesoplanet
|
|
cp /${ARCH_DIR}/bin/M2-Planet ${bindir}/M2-Planet
|
|
cp /${ARCH_DIR}/bin/mkdir ${bindir}/mkdir
|
|
cp /${ARCH_DIR}/bin/sha256sum ${bindir}/sha256sum
|
|
cp /${ARCH_DIR}/bin/unbz2 ${bindir}/unbz2
|
|
cp /${ARCH_DIR}/bin/ungz ${bindir}/ungz
|
|
cp /${ARCH_DIR}/bin/untar ${bindir}/untar
|
|
cp /${ARCH_DIR}/bin/cp ${bindir}/cp
|
|
cp /${ARCH_DIR}/bin/replace ${bindir}/replace
|
|
cp /${ARCH_DIR}/bin/rm ${bindir}/rm
|
|
|
|
chmod 755 ${bindir}/blood-elf
|
|
chmod 755 ${bindir}/catm
|
|
chmod 755 ${bindir}/chmod
|
|
chmod 755 ${bindir}/cp
|
|
chmod 755 ${bindir}/get_machine
|
|
chmod 755 ${bindir}/hex2
|
|
chmod 755 ${bindir}/kaem
|
|
chmod 755 ${bindir}/match
|
|
chmod 755 ${bindir}/M1
|
|
chmod 755 ${bindir}/M2-Mesoplanet
|
|
chmod 755 ${bindir}/M2-Planet
|
|
chmod 755 ${bindir}/mkdir
|
|
chmod 755 ${bindir}/sha256sum
|
|
chmod 755 ${bindir}/unbz2
|
|
chmod 755 ${bindir}/ungz
|
|
chmod 755 ${bindir}/untar
|
|
chmod 755 ${bindir}/replace
|
|
chmod 755 ${bindir}/rm
|
|
|
|
PATH=${bindir}
|
|
|
|
cd ${sysa}
|
|
|
|
catm run2.kaem bootstrap.cfg run.kaem
|
|
chmod 755 run2.kaem
|
|
|
|
kaem --file run2.kaem
|