3 # a frivolous but useful script that shows information about the local
4 # computer in terms of an adventure game inventory listing.
6 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
8 unset -v codename osname osver
9 if [ $OPERATING_SYSTEM == "UNIX" ]; then
10 which lsb_release &>/dev/null
12 codename="$(lsb_release -cs 2>/dev/null)"
13 osname="$(lsb_release -is 2>/dev/null)"
14 osver="$(lsb_release -rs 2>/dev/null)"
17 if [ -z "$codename" ]; then
23 # see if uptime even exists.
26 # test if this uptime knows the -p flag.
31 up="$(uptime | awk '{print $2 " " $3 " " $4 " plus " $1 " hours" }')"
34 # if we can't do this, then we're not even on windows cygwin. wth are we?
35 up="up a whole $(cat /proc/uptime|awk '{print $1}') seconds, yo"
38 # decide whether they've got splitter available or not.
39 if [ -f "$FEISTY_MEOW_BINARIES/splitter" -o -f "$FEISTY_MEOW_BINARIES/splitter.exe" ]; then
40 # calculate the number of columsn in the terminal.
42 splitter="$FEISTY_MEOW_BINARIES/splitter --maxcol $(($cols - 1))"
44 # not available, so just emit as huge overly long string.
48 echo "it is $(date +"%A at %H:%M hours on day %e of the %B moon in the gregorian year %Y" | tr A-Z a-z) and our intrepid adventurer $USER is exploring a computer named $(hostname) that is running in a thoughtspace called $osname $osver (code-name $codename), and $USER has deduced that the machine's OS platform is $(uname -m) and its current incarnation has been ${up}." | $splitter
50 echo "the following things appear to be lying around here..."
54 echo "there appear to be these entities on this host..."