2020-12-23 06:02:57 +00:00
|
|
|
#!/bin/sh
|
2021-02-08 06:23:31 +00:00
|
|
|
|
2021-06-10 18:01:47 +01:00
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
2022-04-24 04:59:17 +01:00
|
|
|
# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space>
|
2022-05-20 17:48:18 +01:00
|
|
|
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
2020-12-23 06:02:57 +00:00
|
|
|
#
|
2021-02-08 06:23:31 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2020-12-23 06:02:57 +00:00
|
|
|
|
2021-06-10 18:01:47 +01:00
|
|
|
set -ex
|
2020-12-23 06:02:57 +00:00
|
|
|
|
2021-12-28 11:51:15 +00:00
|
|
|
PATH=/${ARCH_DIR}/bin
|
2021-01-20 01:43:40 +00:00
|
|
|
|
2021-06-10 18:01:47 +01:00
|
|
|
# Set commonly used variables
|
2022-04-13 00:08:29 +01:00
|
|
|
sysa=/sysa
|
2022-04-24 04:59:17 +01:00
|
|
|
distfiles=/sysa/distfiles
|
2021-07-26 06:25:15 +01:00
|
|
|
prefix=/usr
|
2021-06-10 18:01:47 +01:00
|
|
|
bindir=${prefix}/bin
|
|
|
|
libdir=${prefix}/lib
|
|
|
|
incdir=${prefix}/include
|
2022-05-20 15:55:35 +01:00
|
|
|
srcdir=${prefix}/src
|
2022-04-13 00:08:29 +01:00
|
|
|
TMPDIR=/tmp # tmpdir is needed for patch to work
|
2021-06-24 00:32:19 +01:00
|
|
|
|
2022-05-20 15:55:35 +01:00
|
|
|
mkdir -p ${prefix} ${bindir} ${libdir} ${incdir} ${srcdir} ${TMPDIR}
|
2021-06-10 18:01:47 +01:00
|
|
|
|
2021-06-24 00:32:19 +01:00
|
|
|
# Remove remaining dependencies on /bin (stage0-posix directory)
|
2022-05-20 17:13:54 +01:00
|
|
|
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
|
2022-09-26 05:22:43 +01:00
|
|
|
cp /${ARCH_DIR}/bin/M2-Mesoplanet ${bindir}/M2-Mesoplanet
|
2022-05-20 17:13:54 +01:00
|
|
|
cp /${ARCH_DIR}/bin/M2-Planet ${bindir}/M2-Planet
|
|
|
|
cp /${ARCH_DIR}/bin/mkdir ${bindir}/mkdir
|
|
|
|
cp /${ARCH_DIR}/bin/sha256sum ${bindir}/sha256sum
|
2022-12-25 01:49:54 +00:00
|
|
|
cp /${ARCH_DIR}/bin/unbz2 ${bindir}/unbz2
|
2022-05-20 17:13:54 +01:00
|
|
|
cp /${ARCH_DIR}/bin/ungz ${bindir}/ungz
|
|
|
|
cp /${ARCH_DIR}/bin/untar ${bindir}/untar
|
|
|
|
cp /${ARCH_DIR}/bin/cp ${bindir}/cp
|
2022-06-12 23:13:01 +01:00
|
|
|
cp /${ARCH_DIR}/bin/replace ${bindir}/replace
|
2022-06-02 22:44:02 +01:00
|
|
|
cp /${ARCH_DIR}/bin/rm ${bindir}/rm
|
2022-05-20 17:13:54 +01:00
|
|
|
|
|
|
|
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
|
2022-09-26 05:22:43 +01:00
|
|
|
chmod 755 ${bindir}/M2-Mesoplanet
|
2022-05-20 17:13:54 +01:00
|
|
|
chmod 755 ${bindir}/M2-Planet
|
|
|
|
chmod 755 ${bindir}/mkdir
|
|
|
|
chmod 755 ${bindir}/sha256sum
|
2022-12-25 01:49:54 +00:00
|
|
|
chmod 755 ${bindir}/unbz2
|
2022-05-20 17:13:54 +01:00
|
|
|
chmod 755 ${bindir}/ungz
|
|
|
|
chmod 755 ${bindir}/untar
|
2022-06-12 23:13:01 +01:00
|
|
|
chmod 755 ${bindir}/replace
|
2022-06-02 22:44:02 +01:00
|
|
|
chmod 755 ${bindir}/rm
|
2021-06-10 18:01:47 +01:00
|
|
|
|
2021-07-26 06:25:15 +01:00
|
|
|
PATH=${bindir}
|
2021-06-10 18:01:47 +01:00
|
|
|
|
2022-04-13 00:08:29 +01:00
|
|
|
cd ${sysa}
|
2021-06-11 22:39:50 +01:00
|
|
|
|
2022-05-20 17:48:18 +01:00
|
|
|
catm run2.kaem bootstrap.cfg run.kaem
|
2022-05-21 20:15:47 +01:00
|
|
|
chmod 755 run2.kaem
|
2021-06-10 18:01:47 +01:00
|
|
|
|
2022-05-20 17:48:18 +01:00
|
|
|
kaem --file run2.kaem
|