From: Armaan Bhojwani Date: Sun, 10 Jan 2021 16:35:29 +0000 (-0500) Subject: Add more flexibility to usage of lolcat-gen X-Git-Tag: v0.0.1~66 X-Git-Url: https://git.armaanb.net/?p=bin.git;a=commitdiff_plain;h=96287130e6228c11dc539bc096fdf4bbdafc8296 Add more flexibility to usage of lolcat-gen --- diff --git a/lolcat-gen b/lolcat-gen index 00b60ad..333bf73 100755 --- a/lolcat-gen +++ b/lolcat-gen @@ -1,10 +1,23 @@ #!/usr/bin/env bash # Generates lolcated logo for my shell rc +if [[ ${2} ]]; then + FILE=${2} +else + FILE="~/Code/personal-logo/square/unicode/small" +fi + +if [[ ${1} ]]; then + NUM=${1} +else + NUM="100" +fi + [[ -d ~/.local/share/zsh/lolcat/ ]] || mkdir -p ~/.local/share/zsh/lolcat -rm -rf ~/.local/share/zsh/lolcat/* -for (( i = 0; i < $1 ; i++ )); do - cat ~/Code/personal-logo/ascii/ascii-small-white | lolcat --force > ~/.local/share/zsh/lolcat/$i +rm ~/.local/share/zsh/lolcat/* + +for (( i = 0; i < ${NUM} ; i++ )); do + cat $FILE | lolcat --force > ~/.local/share/zsh/lolcat/$i echo -ne "$i/$1 done" \\r done