]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
Add scripts/setup_uv.sh
authorZack Cerza <zack@cerza.org>
Fri, 1 Aug 2025 21:44:34 +0000 (15:44 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 11 Sep 2025 21:25:24 +0000 (15:25 -0600)
Signed-off-by: Zack Cerza <zack@cerza.org>
scripts/setup_uv.sh [new file with mode: 0755]

diff --git a/scripts/setup_uv.sh b/scripts/setup_uv.sh
new file mode 100755 (executable)
index 0000000..808af71
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+# vim: ts=4 sw=4 expandtab
+
+function setup_pipx () {
+  command -v pipx || (
+    command -v apt && sudo apt install -y pipx
+    command -v dnf && sudo dnf install -y pipx
+  )
+  pipx ensurepath
+}
+
+function setup_uv () {
+  setup_pipx
+  pipx install uv
+}
+
+# If the script is executed (as opposed to sourced), run the function now
+if [ "$(basename -- "${0#-}")" = "$(basename -- "${BASH_SOURCE[0]}")" ]; then
+  setup_uv
+fi