diff options
author | EuAndreh <eu@euandre.org> | 2025-05-09 08:28:24 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-09 08:28:24 -0300 |
commit | 83490f3cbe48fcef54c49a788337a1e7a681e6fa (patch) | |
tree | 9d414d08e9b453b939619a4da0b497b168775a84 | |
parent | src/pre: Use sed(1) and handle buffering with stdbuf(1) (diff) | |
download | eut-83490f3cbe48fcef54c49a788337a1e7a681e6fa.tar.gz eut-83490f3cbe48fcef54c49a788337a1e7a681e6fa.tar.xz |
src/urlid: Add working version, based on uuid(1) and xxxd(1)
-rw-r--r-- | deps.mk | 1 | ||||
-rwxr-xr-x | src/urlid | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -20,6 +20,7 @@ sources.sh = \ src/timestamp \ src/untill \ src/uri \ + src/urlid \ src/uuid \ src/varlist \ diff --git a/src/urlid b/src/urlid new file mode 100755 index 0000000..7d1f02a --- /dev/null +++ b/src/urlid @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +uuid "$@" | + tr -d '-' | + xxxd | + base64 | + sed -e 's|/|_|g' -e 's|+|-|g' -e 's|=||g' |