eepykate / fet.sh

🐢 a fetch written in posix shell without any external commands (sponsored by https://git.io/kiwmi)
https://github.com/buffet/kiwmi
ISC License
366 stars 22 forks source link

Useless use of echo. #6

Closed lslvr closed 4 years ago

lslvr commented 4 years ago

TL;DR:

set -- $(echo ...) is useless use of echo.


It happens three times:

There's no need of $(echo ...); the shell will expand the globbing patterns, and needs no "help".

Also, instead of three pkgs=$#'s, use only one after performing the checks (i.e., after line 136).

eepykate commented 4 years ago

@vizs what have you say about your bad code.

jk.

Thank you, I'll fix it.

lslvr commented 4 years ago

You're welcome. I love the idea of this script.

9viz commented 4 years ago

This is what happens when you shell script right after you wake up I guess :P