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