Initial commit
This commit is contained in:
commit
f44e84ee52
49
lsd/dist/documentation/trinitx.7
vendored
Normal file
49
lsd/dist/documentation/trinitx.7
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
.TH TRINITX 7
|
||||
|
||||
.SH PRONUNCIATION
|
||||
|
||||
Trinity, but replace the final syllable with tech.
|
||||
|
||||
.SH SYNOPSIS
|
||||
|
||||
.I Trinitx
|
||||
is a UNIX-like software distribution built upon the Linux kernel and the
|
||||
musl C standard library, with nearly all configuration options left to the
|
||||
user's own device.
|
||||
|
||||
.SH BASE SYSTEM
|
||||
|
||||
.I Trinitx
|
||||
explicitly relies on the existence of the following programs and
|
||||
packages:
|
||||
dash(1),
|
||||
ftp(1),
|
||||
the GNU compiler collection,
|
||||
GNU make,
|
||||
musl,
|
||||
linux,
|
||||
bsdtar(1),
|
||||
and util-linux.
|
||||
.PP
|
||||
In addition,
|
||||
.I Trinitx
|
||||
needs a core utilities package.
|
||||
The GNU coreutils are a popular choice but Busybox or your own may be used.
|
||||
.PP
|
||||
.I Trinitx
|
||||
also needs an initialization system.
|
||||
OpenRC is the suggested choice but others may be used.
|
||||
SystemD is discouraged; it's mentioned for its popularity and frowned upon for
|
||||
its generally lax security.
|
||||
|
||||
.SH HISTORY
|
||||
|
||||
The
|
||||
.I Trinitx
|
||||
project was started 2021-12-28.
|
||||
|
||||
.SH COPYRIGHT
|
||||
|
||||
.I Trinitx
|
||||
documentation and all in-house tools are part of the public domain.
|
||||
Components of the distribution are of course subject to their own licenses.
|
20
lsd/dist/install
vendored
Executable file
20
lsd/dist/install
vendored
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/true
|
||||
set -e
|
||||
|
||||
depend_on cd
|
||||
depend_on mkdir
|
||||
depend_on nonzero
|
||||
depend_on test
|
||||
|
||||
if ! nonzero "$PREFIX"; then
|
||||
printf 'Please select a $PREFIX for installation.
|
||||
For example, "PREFIX=/ %s".\n' "$0" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# constant definitions
|
||||
MUSL_UPSTREAM="git://git.musl-libc.org/musl"
|
||||
|
||||
argv0="$0"
|
||||
|
||||
trinitx sync_musl
|
31
lsd/dist/macro.sh
vendored
Normal file
31
lsd/dist/macro.sh
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/true
|
||||
|
||||
# constant definitions
|
||||
MUSL_UPSTREAM="git://git.musl-libc.org/musl"
|
||||
|
||||
depend_on(){
|
||||
! command -v "$1" >/dev/null \
|
||||
&& printf "Missing %s.\n" "$1" 1>&2 \
|
||||
&& exit 1 \
|
||||
|| true
|
||||
}
|
||||
|
||||
fetch_upstream(){
|
||||
url="$1"
|
||||
scheme="$(scheme_from_uri "$url")"
|
||||
case "$scheme" in
|
||||
git)
|
||||
git clone "$url"
|
||||
;;
|
||||
*)
|
||||
printf "%s: Invalid upstream URL %s (scheme is %s)\n" \
|
||||
"$argv0" "$1" "$scheme"
|
||||
exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
scheme_from_uri(){
|
||||
# There are no colons in scheme names and no ways to separate schemes
|
||||
# from scheme-specific content without colons (RFC 3986).
|
||||
printf "%s\n" "$1" | cut -d ':' -f 1
|
||||
}
|
14
lsd/dist/sync_musl
vendored
Normal file
14
lsd/dist/sync_musl
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/true
|
||||
set -e
|
||||
|
||||
depend_on cd
|
||||
depend_on make
|
||||
depend_on mkdir
|
||||
|
||||
mkdir -p "$PREFIX/src"
|
||||
cd "$PREFIX/src"
|
||||
|
||||
fetch_upstream "$MUSL_UPSTREAM"
|
||||
cd "$PREFIX/src/musl"
|
||||
./configure --prefix="$PREFIX"
|
||||
make install
|
11
lsd/dist/trinitx
vendored
Executable file
11
lsd/dist/trinitx
vendored
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$PREFIX" ]; then
|
||||
printf 'Please select a $PREFIX for installation.
|
||||
For example, "PREFIX=/ %s".\n' "$0" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$PREFIX"/dist
|
||||
. ./macro.sh
|
||||
. ./"$1"
|
Loading…
Reference in New Issue
Block a user