15 lines
381 B
Plaintext
15 lines
381 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
export LC_ALL=POSIX LANG=POSIX; . "${HOME}/.owl4ce_var"
|
||
|
|
||
|
LINUX_SYS='/sys/devices/virtual/thermal'
|
||
|
|
||
|
if [ -d "${LINUX_SYS}/${TEMP_DEV}" ]; then
|
||
|
exec echo "$(expr $(<"${LINUX_SYS}/${TEMP_DEV}/temp") / 1000)"$'\xc2\xb0C'
|
||
|
elif [ ! -d "$LINUX_SYS" ]; then
|
||
|
exec echo "${LINUX_SYS} is an invalid path!"
|
||
|
else
|
||
|
exec echo "${TEMP_DEV} not found!"
|
||
|
fi
|
||
|
|
||
|
exit ${?}
|