logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 039b8ad6587c9f6647ab40667681080eae59e40c
parent 90cd17e4532af18b5b96703594a7e0403a1ef0cc
Author: fosslinux <fosslinux@aussies.space>
Date:   Mon, 11 Jan 2021 12:21:18 +1100

Merge branch 'stikonas-sed'

Diffstat:

Mrootfs.sh10++++++++++
Msysa/after.kaem.run5+++++
Asysa/sed.kaem17+++++++++++++++++
3 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/rootfs.sh b/rootfs.sh @@ -73,6 +73,16 @@ ln -s /after/lib x86-mes ln -s /after/lib/linux . popd +mkdir -p ../sources + +# sed +url=ftp://ftp.gnu.org/gnu/sed/sed-1.18.tar.gz +pushd ../sources +wget --continue "$url" +popd +cp sed.kaem tmp/after +tar -C tmp/after -xf ../sources/$(basename $url) + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/after.kaem.run b/sysa/after.kaem.run @@ -49,3 +49,8 @@ kaem --file mes.kaem cd tcc-0.9.26p1 kaem --file ../tcc.kaem cd .. + +# Part 7: sed +cd sed-1.18 +kaem --file ../sed.kaem +cd .. diff --git a/sysa/sed.kaem b/sysa/sed.kaem @@ -0,0 +1,17 @@ +#!/bin/sh + +set -ex + +# Variables +bindir=/after/bin + +# Compile +tcc -c getopt1.c +tcc -c getopt.c +tcc -c regex.c +tcc -c utils.c +tcc -c -Dalloca alloca.c +tcc -c -DHAVE_BCOPY sed.c + +# Link +tcc -static -o ${bindir}/sed alloca.o getopt1.o getopt.o regex.o sed.o utils.o