Add -F to grep when we look for fixed strings
This commit is contained in:
parent
25809bf721
commit
e82c898ae1
1 changed files with 5 additions and 5 deletions
10
fetch.sh
10
fetch.sh
|
@ -451,7 +451,7 @@ getcpu () {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux")
|
"Linux")
|
||||||
# Get cpu name
|
# Get cpu name
|
||||||
cpu="$(grep 'model name' /proc/cpuinfo)"
|
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
||||||
cpu=${cpu/model name*: /}
|
cpu=${cpu/model name*: /}
|
||||||
|
|
||||||
# Get cpu speed
|
# Get cpu speed
|
||||||
|
@ -474,14 +474,14 @@ getcpu () {
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
# Get cpu name
|
# Get cpu name
|
||||||
cpu="$(grep 'model name' /proc/cpuinfo)"
|
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
||||||
cpu=${cpu/model name*: /}
|
cpu=${cpu/model name*: /}
|
||||||
cpu=${cpu/ @*/}
|
cpu=${cpu/ @*/}
|
||||||
cpu=${cpu// /}
|
cpu=${cpu// /}
|
||||||
cpu=${cpu% }
|
cpu=${cpu% }
|
||||||
|
|
||||||
# Get cpu speed
|
# Get cpu speed
|
||||||
speed=$(grep 'cpu MHz' /proc/cpuinfo)
|
speed=$(grep -F 'cpu MHz' /proc/cpuinfo)
|
||||||
speed=${speed/cpu MHz*: /}
|
speed=${speed/cpu MHz*: /}
|
||||||
speed=${speed/\./}
|
speed=${speed/\./}
|
||||||
|
|
||||||
|
@ -639,8 +639,8 @@ getwallpaper () {
|
||||||
}
|
}
|
||||||
|
|
||||||
getimage () {
|
getimage () {
|
||||||
# Check if the directory exists
|
# Make the directory if it doesn't exist
|
||||||
[ ! -d "$imgtempdir" ] && (mkdir "$imgtempdir" || exit)
|
mkdir -p "$imgtempdir"
|
||||||
|
|
||||||
# Image size is half of the terminal
|
# Image size is half of the terminal
|
||||||
imgsize=$((columns * font_width / split_size))
|
imgsize=$((columns * font_width / split_size))
|
||||||
|
|
Loading…
Reference in a new issue