Skip to content

Commit

Permalink
Makes show_hostname function more pure
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfaraday committed Jul 12, 2021
1 parent 0280414 commit c779a19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bash_functions
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ _readlinkf() {
#-------------
show_hostname() {
local font=${1:-"doom"}
local namefile=${BASH_CACHE_DIR}/bash_banner_${BANNER_FONT}.txt
local namefile=${BASH_CACHE_DIR}/bash_banner_${font}.txt
local _hostname=$(hostname -s)
#the file must be there and must have some content
if [ -e "${namefile}" ] && (( $(\ls -l ${namefile} | awk '{print $5}') > 0 )) && [ "$(sed -n '1p' ${namefile})" = "${_hostname}" ] ; then
Expand Down

0 comments on commit c779a19

Please sign in to comment.