From e82c898ae1cdad52d597409b76340d6d0bdabb14 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 6 Jan 2016 11:36:57 +1100 Subject: [PATCH] Add -F to grep when we look for fixed strings --- fetch.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fetch.sh b/fetch.sh index 01f9537f..af72b279 100755 --- a/fetch.sh +++ b/fetch.sh @@ -451,7 +451,7 @@ getcpu () { case "$os" in "Linux") # Get cpu name - cpu="$(grep 'model name' /proc/cpuinfo)" + cpu="$(grep -F 'model name' /proc/cpuinfo)" cpu=${cpu/model name*: /} # Get cpu speed @@ -474,14 +474,14 @@ getcpu () { "Windows") # Get cpu name - cpu="$(grep 'model name' /proc/cpuinfo)" + cpu="$(grep -F 'model name' /proc/cpuinfo)" cpu=${cpu/model name*: /} cpu=${cpu/ @*/} cpu=${cpu// /} cpu=${cpu% } # Get cpu speed - speed=$(grep 'cpu MHz' /proc/cpuinfo) + speed=$(grep -F 'cpu MHz' /proc/cpuinfo) speed=${speed/cpu MHz*: /} speed=${speed/\./} @@ -639,8 +639,8 @@ getwallpaper () { } getimage () { - # Check if the directory exists - [ ! -d "$imgtempdir" ] && (mkdir "$imgtempdir" || exit) + # Make the directory if it doesn't exist + mkdir -p "$imgtempdir" # Image size is half of the terminal imgsize=$((columns * font_width / split_size))