Mercurial > index.cgi > dotfiles
comparison .bash_profile @ 105:3f1ead4ba8b4
Changes for the Pi:
* Code block to start emulationstation if the circumstances warrant, as well
* as checking for the presence of a PS3 controller and warning that it isn't
* connected. Also adding usernames to the ssh config to make aliases and
* whatnot work more easily.
author | Steve Huston <huston@astro.princeton.edu> |
---|---|
date | Sat, 08 Mar 2014 10:00:34 -0500 |
parents | c4dccb49471b |
children | 90f60047d5b4 |
comparison
equal
deleted
inserted
replaced
103:23384e94013c | 105:3f1ead4ba8b4 |
---|---|
64 # directory is clean. | 64 # directory is clean. |
65 if [ "`hg -q tip | sed 's/.*://'`" != "`hg -q id | sed 's/\+//'`" ] ; then | 65 if [ "`hg -q tip | sed 's/.*://'`" != "`hg -q id | sed 's/\+//'`" ] ; then |
66 echo Local repository contains updates. | 66 echo Local repository contains updates. |
67 fi | 67 fi |
68 hg status | 68 hg status |
69 | |
70 [[ $HOST == cake && "`tty`" == "/dev/tty1" ]] && { | |
71 # We're on the Raspberry Pi | |
72 export SDL_NOMOUSE=1 | |
73 if [ ! -e /dev/input/js0 ] ; then | |
74 # PS3 controller isn't paired yet | |
75 dialog --infobox "WARNING: PS3 controller not detected. Please press the PS button to pair. Ctrl-C on keyboard to skip." 4 55 | |
76 ( | |
77 trap break INT | |
78 for C in {1..30} ; do | |
79 sleep 1 | |
80 if [ -e /dev/input/js0 ] ; then | |
81 break | |
82 fi | |
83 done | |
84 ) | |
85 fi | |
86 clear | |
87 /usr/bin/emulationstation | |
88 } |