1
0

clean out the rest of the shell stuff, remove try(1)

This commit is contained in:
dtb 2022-01-30 19:51:21 -05:00
parent 7b6e55522b
commit 3bfd03e236
4 changed files with 15 additions and 109 deletions

27
lsd/dist/doc/trilsd.7 vendored
View File

@ -10,17 +10,15 @@ musl C standard library, with nearly all configuration options left to the
user's own device.
.SH BASE SYSTEM
A
.I TriLSD
explicitly relies on the existence of the following programs and
packages:
dash(1),
ftp(1),
system always has the following packages:
dash,
the GNU compiler collection,
GNU make,
musl,
linux,
bsdtar(1),
and util-linux.
and
linux and util-linux.
.PP
In addition,
.I TriLSD
@ -33,15 +31,20 @@ 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 INSTALLATION
To install
.I TriLSD
most of the POSIX specified utilities including awk, git(1), GNU make, and a C
compiler that can build the GNU compiler collection must be installed.
.PP
For the installation process see
.RB try (1)
.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.

55
lsd/dist/doc/try.1 vendored
View File

@ -1,55 +0,0 @@
.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)

31
lsd/dist/macro.sh vendored
View File

@ -1,31 +0,0 @@
#!/bin/false
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)
depend_on git
git clone "$url"
;;
*)
printf "%s: Invalid upstream URL %s (scheme is %s)\n" \
"$argv0" "$1" "$scheme"
exit 1
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).
printf "%s\n" "$1" | cut -d ':' -f 1
}

11
lsd/dist/try vendored
View File

@ -1,11 +0,0 @@
#!/bin/sh
if [ -z "$PREFIX" ]; then
printf 'Please select a $PREFIX for installation.
For example, "PREFIX=/ %s".\n' "$0" 1>&2
exit 1
fi
. "$PREFIX/dist/config.sh"
. "$PREFIX/dist/macro.sh"
. "$PREFIX/dist/$1"