From ca90490239e528c18b17101977db493612d1d6ba Mon Sep 17 00:00:00 2001 From: Dennis ten Hoove Date: Sun, 21 Apr 2024 21:02:22 +0200 Subject: [PATCH] Move docs to man pages --- arkdep | 40 ---------------------------------------- arkdep-build | 22 ---------------------- doc/arkdep-build.8 | 25 +++++++++++++++++++++++++ doc/arkdep.8 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 62 deletions(-) create mode 100644 doc/arkdep-build.8 create mode 100644 doc/arkdep.8 diff --git a/arkdep b/arkdep index 64e016e..6923354 100755 --- a/arkdep +++ b/arkdep @@ -7,46 +7,6 @@ set -o pipefail -# Print manual if no parameters provided or invalid amount of parameters is provided -if [[ ! -n $1 ]]; then - cat <<- END - Usage: arkdep [variant] [version] - Actions: - deploy Deploy a new or update an existing deployment - init Initialize arkdep on a new system - teardown Remove all arkdep-deploy related files and folders - cleanup Remove any hanging images and unfinished downloads - healthcheck Check for and report any config issues or untracked deployments - get-available List available packages in repo - remove Remove a specified deployment - - Examples: - arkdep deploy - Check for updates, if available download and deploy - - arkdep deploy test-arkanelinux-kde - Download and deploy the latest release of the defined image variant - - arkdep deploy - stable_v1 - Download the defined image release from the default variant - - arkdep deploy test-arkanelinux-kde stable_v1 - Download the defined image release from the specified variant - - arkdep deploy cache stable_v1 - Deploy an image from the cache directly skipping database download and checksum check - - arkdep remove stable_v1 - Remove the defined deployment - - Variables: - ARKDEP_ROOT Prepend path to arkdep target directory - ARKDEP_BOOT Set custom /boot location, overwrites ARKDEP_ROOT on relevant tasks if set, implies ARKDEP_NO_BOOTCTL - ARKDEP_NO_BOOTCTL Do not run bootctl commands - END - exit 0 -fi - ## Set common variables # declare -r arkdep_dir="$(readlink -m $ARKDEP_ROOT/arkdep)" diff --git a/arkdep-build b/arkdep-build index 0003f1a..227c27c 100755 --- a/arkdep-build +++ b/arkdep-build @@ -5,28 +5,6 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# Print manual if no parameters provided or invalid amount of parameters is provided -if [[ ! -n $1 || -n $2 ]]; then - cat <<- END - Usage: arkdep-build [variant] - Variants: - archlinux Plain Arch Linux TTY image - arkanelinux Arkane Linux GNOME image - - Variants are loaded based on their directory names, the ones listed here - are included by default. - - Variables: - ARKDEP_NO_TAR Do not create a compressed tarball, only create the images - ARKDEP_CUSTOM_NAME Define a custom image name - ARKDEP_OUTPUT_TARGET Overwrite location to which images will be written - ARKDEP_CONFIGS Define directory in which build will search for configuration files - ARKDEP_NO_CLEANUP Do not remove the temporary rootfs upon error or exit - ARKDEP_STATIC_WORKDIR Reset workdir back to workable state if still present - END - exit 0 -fi - ## Common functions # # Cleanup and quit if error diff --git a/doc/arkdep-build.8 b/doc/arkdep-build.8 new file mode 100644 index 0000000..9b1b1d7 --- /dev/null +++ b/doc/arkdep-build.8 @@ -0,0 +1,25 @@ +.TH ARKDEP-BUILD 8 "21 April 2024" +.SH NAME +arkdep-build - Build root filesystem Btrfs subvolume exports in Arkdep format +.SH SYNOPSIS +\fBarkdep-build\fR {variant} +.SH DESCRIPTION +Arkdep-build utilizes traditional distro-specific system installation tools to build and configure an new root filesystem installation to Btrfs subvolumes, afterwards these subvolumes are exported in a format \fIArkdep\fR will accept for deployement. + +The tool has to be run from \fIarkdep-build.d\fR's parent directory, the completed images in both packaged and unpackages format will be outputted to the \fItarget\fR directory. +.SH ENVIRONMENT +.SS ARKDEP_NO_TAR +Do no create a compressed tarball, only create the images. +.SS ARKDEP_CUSTOM_NAME +Define a custom image name overwriting the default random 42 character hexadecimal string. +.SS ARKDEP_OUTPUT_TARGET +Overwrite the location to which images will be written. +.SS ARKDEP_CONFIGS +Define a directory in which arkdep-build will search for variant configuration files. +.SS ARKDEP_NO_CLEANUP +Do not remove the temporary rootfs upon error or completion. +.SS ARKDEP_STATIC_WORKDIR +Reset workdir back to workable state if still present. +.SH EXAMPLES +.SS arkdep-build arkanelinux +Build the arkanelinux variant in \fB./arkdep-build.d/arkanelinux\fR. diff --git a/doc/arkdep.8 b/doc/arkdep.8 new file mode 100644 index 0000000..53b195b --- /dev/null +++ b/doc/arkdep.8 @@ -0,0 +1,46 @@ +.TH ARKDEP 8 "21 April 2024" +.SH NAME +arkdep - Manage arkdep deployments +.SH SYNOPSIS +\fBarkdep\fR {option} [version] +.br +\fBarkdep\fR {option} [variant] [version] +.SH DESCRIPTION +Arkdep is a utility which downloads, deploys and manages Btrfs subvolume exports. + +It is able to perform atomic and immutable system updates, migrate local data to new deployments, update the systemd-boot bootloader configuration and switch the by default booted root subvolume through EFI variables. +.SH OPTIONS +.SS deploy +Deploy a new or update an existing deployment. +.SS init +Initialize arkdep on a new system. +.SS teardown +Remove all arkdep-deploy related files and folders. +.SS cleanup +Remove any hanging images and unfinished downloads. +.SS healthcheck +Check for and report any config issues or untracked deployments. +.SS get-available +Get and print available variants in repo. +.SS remove +Remove specified deployments. +.SH ENVIRONMENT +.SS ARKDEP_ROOT +Prepend path to arkdep target directory. +.SS ARKDEP_BOOT +Set custom /boot location, overwrites ARKDEP_ROOT on relevant tasks if set, implies ARKDEP_NO_BOOTCTL. +.SS ARKDEP_NO_BOOTCTL +Do not run bootctl commands, this includes installing systemd-boot and setting the new deployment as the default boot entry. +.SH EXAMPLES +.SS arkdep deploy +Check for updates, if available download and deploy. +.SS arkdep deploy test-arkanelinux-kde +Download and deploy the latest version of the defined image variant. +.SS arkdep deploy - stable_v1 +Download the defined image version from the default variant. +.SS arkdep deploy test-arkanelinux-kde stable_v1 +Download the defined image version from the specified variant. +.SS arkdep deploy cache stable_v1 +Deploy an image from the local cache skipping database download and checksum check. +.SS arkdep remove stable_v1 +Remove the defined deployment.