From a9caf4bbd04ec31d113af5cd2e46c7fd21ed95ce Mon Sep 17 00:00:00 2001 From: jnats Date: Fri, 23 Apr 2021 23:59:45 +0100 Subject: new install.sh just dropped --- install.sh | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 9a54462..6c0f806 100644 --- a/install.sh +++ b/install.sh @@ -1,4 +1,29 @@ -#!/bin/sh +#!/bin/bash -chmod +x nofetch -cp nofetch /usr/local/bin/nofetch +if [ $EUID -eq 0 ] +then + if [ $DEBUG -eq 1 ] + then + echo "[/] uid 0" + fi + chmod +x nofetch + sudo cp nofetch /usr/local/bin +elif command -v doas &> /dev/null +then + if [ $DEBUG -eq 1 ] + then + echo "[/] doas" + fi + chmod +x nofetch + doas cp nofetch /usr/local/bin +elif command -v sudo &> /dev/null +then + if [ $DEBUG -eq 1 ] + then + echo "[/] sudo" + fi + chmod +x nofetch + sudo cp nofetch /usr/local/bin +else + echo "\n[X] neither doas nor sudo found, and command isn't running as root, have you checked README.md ?\n" +fi -- cgit v1.2.3