15 lines
381 B
Bash
Executable File
15 lines
381 B
Bash
Executable File
#!/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 ${?}
|