add encode script

This commit is contained in:
2025-08-28 17:57:02 -05:00
parent 96689ac1d5
commit 315d340257
5 changed files with 506 additions and 2 deletions

View File

@@ -162,3 +162,12 @@ line_starts_with() {
is_darwin() {
line_contains "$(print_os)" darwin
}
is_positive_integer() {
local input="$1"
if [[ ${input} != ?(-)+([[:digit:]]) || ${input} -lt 0 ]]; then
echo_fail "${input} is not a positive integer"
return 1
fi
return 0
}