From ca348329f106a2d92417fbf5f48d8b8faeb0f9d7 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 30 Dec 2021 10:06:52 -0500 Subject: [PATCH] Rename --- lsd/dist/config.sh | 3 + .../documentation/{trinitx.7 => trilsd.7} | 39 ++++++++----- lsd/dist/documentation/try.1 | 55 +++++++++++++++++++ lsd/dist/install | 2 +- lsd/dist/macro.sh | 8 +-- lsd/dist/sync_musl | 2 +- lsd/dist/{trinitx => try} | 0 lsd/dist/unrepo | 4 +- 8 files changed, 93 insertions(+), 20 deletions(-) create mode 100644 lsd/dist/config.sh rename lsd/dist/documentation/{trinitx.7 => trilsd.7} (59%) create mode 100644 lsd/dist/documentation/try.1 rename lsd/dist/{trinitx => try} (100%) diff --git a/lsd/dist/config.sh b/lsd/dist/config.sh new file mode 100644 index 0000000..9d09e0a --- /dev/null +++ b/lsd/dist/config.sh @@ -0,0 +1,3 @@ +#!/bin/false + +MUSL_UPSTREAM="git://git.musl-libc.org/musl" diff --git a/lsd/dist/documentation/trinitx.7 b/lsd/dist/documentation/trilsd.7 similarity index 59% rename from lsd/dist/documentation/trinitx.7 rename to lsd/dist/documentation/trilsd.7 index 8038026..2a7ec4e 100644 --- a/lsd/dist/documentation/trinitx.7 +++ b/lsd/dist/documentation/trilsd.7 @@ -1,19 +1,16 @@ .TH TRINITX 7 .SH PRONUNCIATION - -Trinity, but replace the final syllable with tech. +"Try LSD" .SH SYNOPSIS - -.I Trinitx +.I TriLSD 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 +.I TriLSD explicitly relies on the existence of the following programs and packages: dash(1), @@ -26,24 +23,40 @@ bsdtar(1), and util-linux. .PP In addition, -.I Trinitx +.I TriLSD needs a core utilities package. The GNU coreutils are a popular choice but Busybox or your own may be used. .PP -.I Trinitx +.I TriLSD 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 +.SH PACKAGE MANAGEMENT +.I TriLSD +does not come with a package manager; the user may choose whatever +system-independent package manager they prefer. +.PP +Certain system tools that aren't necessarily packaged in system-independent +package managers (pkgsrc comes to mind) can be updated with the +.RB try (1) +command. +.SH CONTRIBUTING +Pay attention to projects' guidelines for distributions. +.PP +musl guidelines: https://wiki.musl-libc.org/guidelines-for-distributions.html + +.SH HISTORY The -.I Trinitx -project was started 2021-12-28. +.I TriLSD +project was started 2021-12-28 as Trinitx. .SH COPYRIGHT - -.I Trinitx +.I TriLSD documentation and all in-house tools are part of the public domain. Components of the distribution are of course subject to their own licenses. + +.SH SEE ALSO +.RB try (1) diff --git a/lsd/dist/documentation/try.1 b/lsd/dist/documentation/try.1 new file mode 100644 index 0000000..41145af --- /dev/null +++ b/lsd/dist/documentation/try.1 @@ -0,0 +1,55 @@ +.TH TRINITX 1 + +.SH NAME +try \- distribution management + +.SH SYNOPSIS +.B try +.RB { install , sync_musl , unrepo } + +.SH DESCRIPTION +.I try +exists to conduct system tasks normally conducted by operating systems +themselves and for which there's no easy alternative (though the system is not +tightly coupled with these utilities and they can easily be replaced). + +.SH FUNCTIONS +.SS INSTALL +Installs the software distribution base into an environment variable specified +prefix. If +.I install +is not called in the form +.IP +\fCPREFIX=/ try install\fP +.LP +it will print a diagnostic message and exit; PREFIX must not be empty. + +.SS SYNC_MUSL +Fetches musl from the upstream source and installs it into the PREFIX. PREFIX +may not be specified but behavior will be unspecified (probably function as if +PREFIX is '/') if it's not. + +.SS UNREPO +Deletes git repository files from PREFIX if they exist; this is a +post-installation task and need only be performed once. PREFIX may not be +specified; if it isn't, it'll function as if PREFIX is '/'. + +.SH CONFIGURATION +.I try +may be configured via +.B config.sh +in the same directory. + +.SH LOCATIONS +.I try +distribution-specific files are always located in $PREFIX/dist. +For example, the +.I try +script is always at $PREFIX/dist/try, and configuration is always at +$PREFIX/dist/config.sh. + +.SH COPYRIGHT +Public domain. + +.SH SEE ALSO +.RB trilsd (7) diff --git a/lsd/dist/install b/lsd/dist/install index 7cf5ebd..2d435c2 100755 --- a/lsd/dist/install +++ b/lsd/dist/install @@ -1,4 +1,4 @@ -#!/bin/true +#!/bin/false set -e depend_on nonzero diff --git a/lsd/dist/macro.sh b/lsd/dist/macro.sh index 0a82a0d..f2813ca 100644 --- a/lsd/dist/macro.sh +++ b/lsd/dist/macro.sh @@ -1,7 +1,4 @@ -#!/bin/true - -# constant definitions -MUSL_UPSTREAM="git://git.musl-libc.org/musl" +#!/bin/false depend_on(){ ! command -v "$1" >/dev/null \ @@ -15,6 +12,7 @@ fetch_upstream(){ scheme="$(scheme_from_uri "$url")" case "$scheme" in git) + depend_on git git clone "$url" ;; *) @@ -24,6 +22,8 @@ fetch_upstream(){ esac } +depend_on cut + scheme_from_uri(){ # There are no colons in scheme names and no ways to separate schemes # from scheme-specific content without colons (RFC 3986). diff --git a/lsd/dist/sync_musl b/lsd/dist/sync_musl index 8da240c..e086230 100644 --- a/lsd/dist/sync_musl +++ b/lsd/dist/sync_musl @@ -1,4 +1,4 @@ -#!/bin/true +#!/bin/false set -e depend_on cd diff --git a/lsd/dist/trinitx b/lsd/dist/try similarity index 100% rename from lsd/dist/trinitx rename to lsd/dist/try diff --git a/lsd/dist/unrepo b/lsd/dist/unrepo index e74d56c..3ecb9a2 100644 --- a/lsd/dist/unrepo +++ b/lsd/dist/unrepo @@ -1,4 +1,6 @@ -#!/bin/true +#!/bin/false + +depend_on rm rm -rf "$PREFIX/.git" rm -f "$PREFIX/LICENSE"