tasty changes to the inventory command, which now has that name instead of just 'i'.
[feisty_meow.git] / scripts / core / inventory.sh
1 #!/bin/bash
2
3 # a frivolous but useful script that shows information about the local
4 # computer in terms of an adventure game inventory listing.
5
6 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
7
8 echo
9 echo '++++++++++++++++++++++++++++++++++++++++++'
10
11 unset codename
12 if [ $OPERATING_SYSTEM == "UNIX" ]; then
13   which lsb_release &>/dev/null
14   if [ $? -eq 0 ]; then
15     codename="$(lsb_release -cs 2>/dev/null)"
16   fi
17 fi
18 if [ -z "$codename" ]; then
19   codename="mysterioso"
20 fi
21
22 echo
23 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) (code-name $codename) and has found that the machine's OS platform is $(uname -m) and its current incarnation has been $(uptime -p)." | splitter 
24 #hmmm: splitter not accepting these args properly right now:
25 #--mincol 2 --maxcol 40
26 echo
27 echo '++++++++++++++++++++++++++++++++++++++++++'
28 echo
29 echo "the following things appear to be lying around here..."
30 echo
31 ls -hFC $color_add
32 echo
33 echo '++++++++++++++++++++++++++++++++++++++++++'
34 echo
35 echo "there appear to be these entities on this host..."
36 echo
37 who -suT
38 echo
39 echo '++++++++++++++++++++++++++++++++++++++++++'
40 echo
41