From 41039b36ec75467076ada2bb0f6f7866eafaea09 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sat, 25 Apr 2026 20:10:07 -0400 Subject: feat: Main Page to search for man pages Added a main index page that uses HTMX to search for man pages and place the contents on the page. --- copy | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 copy (limited to 'copy') diff --git a/copy b/copy new file mode 100755 index 00000000..8ec9a97c --- /dev/null +++ b/copy @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +NAME="$(basename "$0")" +FROM="$1" +TO="$2" + +usage() { + printf "Usage: %s from to\n" "$NAME" + printf "from The directory to copy from.\n" + printf "to The directory to copy to.\n" +} + +if [[ ! -d "$FROM" ]]; +then + usage + exit 1 +fi + +if [[ ! -d "$TO" ]]; +then + usage + exit 1 +fi + +for i in {1..9}; +do + if [[ ! -e "$TO/man$i" ]]; + then + mkdir "$TO/man$i" + fi + + find "$FROM" -type f -name "*.$i" | xargs -I {} cp {} "$TO/man$i" +done + -- cgit v1.2.3