diff options
author | axtlos <3alouchi2006@gmail.com> | 2021-04-24 11:38:35 +0200 |
---|---|---|
committer | jnats <dev@jnats.xyz> | 2021-04-24 11:41:54 +0100 |
commit | 9f6f503d940aff829716017f370766162253066f (patch) | |
tree | e9b598bbc2afd596761be142699763d5ba35efe8 | |
parent | 9311c04d6f9332d0cd71aa5fc7346ddee083455c (diff) | |
download | nofetch-9f6f503d940aff829716017f370766162253066f.tar.gz nofetch-9f6f503d940aff829716017f370766162253066f.tar.bz2 |
added option to choose phrase by just typing the number of that phrase ('nofetch 11' for example) and added another phrase
-rwxr-xr-x[-rw-r--r--] | nofetch | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,6 +1,11 @@ #!/bin/bash -rng=$((1 + $RANDOM % 10 )) +if [[ $1 == "" ]]; +then + rng=$((1 + $RANDOM % 11 )) +else + rng=$1 +fi if [ $rng -eq 1 ] then @@ -32,6 +37,14 @@ then elif [ $rng -eq 10 ] then nofetch="plan 4 from the front door" +elif [ $rng -eq 11 ] +then + if [[ $osname == "Arch Linux" ]]; + then + nofetch="I use arch btw" + else + nofetch="I use "$osname "btw" + fi else nofetch="something has gone terribly wrong" fi |