diff --git a/usr/bin/ublue-nix-uninstall b/usr/bin/ublue-nix-uninstall new file mode 100755 index 0000000..42e295d --- /dev/null +++ b/usr/bin/ublue-nix-uninstall @@ -0,0 +1,86 @@ +#!/bin/bash +VERBOSITY="${VERBOSITY:-0}" +SUDO_PROGRAM="${SUDO_PROGRAM:-sudo}" +USER_WARNING="${USER_WARNING:-1}" +[ "$VERBOSITY" = "1" ] && set -x +set -uo pipefail + +function log { + LEVEL=$1 + shift + echo "[${LEVEL}]" $@ >&2 +} + +if [ "$EUID" = 0 ] ; then + log WARNING "Do not run this command as root, as it won't delete proper files in your system" + exit +fi + +if [ "$USER_WARNING" = 1 ] ; then + cat <