aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnats <dev@jnats.xyz>2021-04-24 11:17:12 +0100
committerGitHub <noreply@github.com>2021-04-24 11:17:12 +0100
commita855642cb0693ad8ce1489af751b3ea4906c61a4 (patch)
treeac77d0ebd45aea3309bf329c4e703ebbd07c70ee
parentb759c4af67020635969d14dafdcbb6096997e94a (diff)
downloadnofetch-a855642cb0693ad8ce1489af751b3ea4906c61a4.tar.gz
nofetch-a855642cb0693ad8ce1489af751b3ea4906c61a4.tar.bz2
install.sh now creates /usr/local/bin if not present
this is really strange, but when testing in macOS i realised that by default `/usr/local/bin` is in the path... but doesn't actually exist
-rw-r--r--install.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index 010ab3e..1f6ff17 100644
--- a/install.sh
+++ b/install.sh
@@ -12,18 +12,21 @@ then
echo "[/] uid 0"
rm $(which nofetch > /dev/null 2>&1) > /dev/null 2>&1
chmod +x nofetch
+ mkdir -p /usr/local/bin
cp nofetch /usr/local/bin
elif command -v doas &> /dev/null
then
echo "[/] doas"
doas rm $(which nofetch > /dev/null 2>&1) > /dev/null 2>&1
chmod +x nofetch
+ doas mkdir -p /usr/local/bin
doas cp nofetch /usr/local/bin
elif command -v sudo &> /dev/null
then
echo "[/] sudo"
sudo rm $(which nofetch > /dev/null 2>&1) > /dev/null 2>&1
chmod +x nofetch
+ sudo mkdir -p /usr/local/bin
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"