lib/uuid.sh

181 B · 10 lines · bash

1#!/usr/bin/env bash
2
3brt_uuid() {
4 if command -v uuidgen &>/dev/null; then
5 uuidgen | tr '[:upper:]' '[:lower:]'
6 else
7 python3 -c 'import uuid; print(uuid.uuid4())'
8 fi
9}
10