diff options
author | jnats <dev@jnats.xyz> | 2021-04-23 23:59:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 23:59:45 +0100 |
commit | a9caf4bbd04ec31d113af5cd2e46c7fd21ed95ce (patch) | |
tree | 00de3ee1657d85999272c3e3b4a9ab311e92a3a5 | |
parent | 7fceb220e23f95abe7329984725cbc106783c72a (diff) | |
download | nofetch-a9caf4bbd04ec31d113af5cd2e46c7fd21ed95ce.tar.gz nofetch-a9caf4bbd04ec31d113af5cd2e46c7fd21ed95ce.tar.bz2 |
new install.sh just dropped
-rw-r--r-- | install.sh | 31 |
1 files changed, 28 insertions, 3 deletions
@@ -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 |