aboutsummaryrefslogtreecommitdiff
path: root/install.sh
blob: b7b77d27ea5246a7e695daf9d04c879cbca06bb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

if [ $EUID -eq 0 ]
then
        echo "[/] uid 0"
        chmod +x nofetch
        sudo cp nofetch /usr/local/bin
elif command -v doas &> /dev/null
then
        echo "[/] doas"
        chmod +x nofetch
        doas cp nofetch /usr/local/bin
elif command -v sudo &> /dev/null
then
        echo "[/] sudo"
        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