Variable for scriptpath

This commit is contained in:
Béla Richartz 2021-09-21 23:09:03 +02:00
parent 52c6733e8d
commit 01b098ef55

View File

@ -1,6 +1,6 @@
# Fancy waifu motd
MOTDPATH="$HOME/.motd" # path to motd folder
MOTDPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" # path to motd folder
CACHEFILE="/tmp/waifu.cache" # to cache waifu state
RESOLUTION=256 # resolution of waifu
CENTER=true # center motd?
@ -19,8 +19,8 @@ function output() {
if [ -f "/usr/games/lolcat" ]; then lx="/usr/games/lolcat"; else lx="/usr/bin/lolcat"; fi
case "$val" in
0)
/bin/cat $MOTDPATH/motd
uname $UNAMEARG
/bin/cat $MOTDPATH/motd
uname $UNAMEARG
uptime $UPTIMEARG
;;
@ -73,5 +73,3 @@ function output() {
fi
output $LOLCAT $CENTER
# fi