aboutsummaryrefslogtreecommitdiff
path: root/nofetch
diff options
context:
space:
mode:
authoraxtloss <60044824+axtloss@users.noreply.github.com>2021-04-24 11:42:19 +0200
committerjnats <dev@jnats.xyz>2021-04-24 11:41:54 +0100
commit18dfefdec56bc208dd7698d294de8405d116b8f3 (patch)
tree65178d75e8195f9942c30176fd6df767d0ca7d7f /nofetch
parent9f6f503d940aff829716017f370766162253066f (diff)
downloadnofetch-18dfefdec56bc208dd7698d294de8405d116b8f3.tar.gz
nofetch-18dfefdec56bc208dd7698d294de8405d116b8f3.tar.bz2
fixed an issue, where you could specify a number higher than the count of numbers
Diffstat (limited to '')
-rwxr-xr-xnofetch7
1 files changed, 6 insertions, 1 deletions
diff --git a/nofetch b/nofetch
index 0dc22b3..ada19fe 100755
--- a/nofetch
+++ b/nofetch
@@ -4,7 +4,12 @@ if [[ $1 == "" ]];
then
rng=$((1 + $RANDOM % 11 ))
else
- rng=$1
+ if [[ $1 -lt 11 ]];
+ then
+ rng=$1
+ else
+ rng=$((1 + $RANDOM % 11 ))
+ fi
fi
if [ $rng -eq 1 ]