From: martin f. krafft Date: Tue, 24 Mar 2020 02:03:31 +0000 (+1300) Subject: fall back to python uuid gen X-Git-Url: https://git.madduck.net/etc/tmux.git/commitdiff_plain/cb8596cddf087227d468d145c5890a829682aa3d?ds=sidebyside fall back to python uuid gen --- diff --git a/.bin/tmux b/.bin/tmux index d6ff4b2..3fc4b4f 100755 --- a/.bin/tmux +++ b/.bin/tmux @@ -41,6 +41,9 @@ fi # only without argument create a new session with a random name/id to which we # can then attach +if ! command -v uuidgen >/dev/null; then + uuidgen() { python3 -c 'import uuid; print(uuid.uuid1())'; } +fi UUID=$(uuidgen) echo "$UUID" > $LASTSESSIONIDFILE