From 12b2ed211bf3ea0a9ab90ee56ffdd8dda421e25e Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 26 Nov 2022 15:30:18 -0800 Subject: [PATCH] deb_only marking --- bin/install_tool | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/install_tool b/bin/install_tool index 4c0aefd..cc6c17e 100755 --- a/bin/install_tool +++ b/bin/install_tool @@ -110,6 +110,14 @@ function makedest_or_die { makedest || die "Aborting." } +function deb_only { + # Error if not on a debian or derivative + if ! test -f /etc/debian_version ; then + echo "This tool only available for debian." >&2 + exit 1 + fi +} + # Begin main tool selection case ${TOOL} in john) @@ -323,6 +331,7 @@ case ${TOOL} in add_bin_symlink "Cura.AppImage" cura ;; rr) + deb_only ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mozilla/rr/releases/latest"))["name"])') echo "Latest rr is ${ver}" download \ @@ -433,7 +442,8 @@ EOF cargo install bottom ;; delta) - if !check_sudo ; then + deb_only + if ! check_sudo ; then echo "Must be able to run as sudo." exit 1 fi