fetch: Small code quality changes

This commit is contained in:
Salt 2018-11-22 02:39:53 -06:00
parent 2aec0b70b6
commit 95ba4a45d2

10
fetch
View File

@ -1,8 +1,10 @@
#!/bin/sh
name="$(basename $0 .sh)"
if $(which neofetch > /dev/null 2>&1); then
name="$(basename "$0" .sh)"
if command -v neofetch > /dev/null 2>&1; then
neofetch
scrot "$HOME/Pictures/Screenshots/neofetch-`date +%s`.png"
scrot "$HOME/Pictures/Screenshots/neofetch-$(date +%s).png"
else
printf "$name: Neofetch is not installed; aborting\n"
# shellcheck disable=1117
printf "%s: Neofetch is not installed; aborting\n" \
"$name"
fi