Last active
December 15, 2016 14:26
-
-
Save mdeguzis/5c8dff20378c04bf5bb3 to your computer and use it in GitHub Desktop.
/usr/bin/steamos-update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desktop@steamos:~$ cat /usr/bin/steamos-update | |
#! /bin/sh | |
echo $$ > /tmp/steamos-update.pid | |
apt-get update -y -q | |
unattended-upgrade | |
# workaround for early images which didn't have nvidia-vdpau-driver:i386 preinstalled | |
if [ ! -f /usr/lib/i386-linux-gnu/vdpau/libvdpau_nvidia.so.1 ] ; then | |
apt-get -y install nvidia-vdpau-driver:i386 | |
fi | |
# workaround for early images which didn't have i965-va-driver:i386 preinstalled | |
if [ ! -f /usr/lib/i386-linux-gnu/dri/i965_drv_video.so ] ; then | |
apt-get -y install i965-va-driver:i386 | |
fi | |
# signal steam to refresh its inbox if we need a reboot | |
if [ -f /var/run/reboot-required ] && [ "`pidof -s steam`" != '' ] ; then | |
STEAMPID=`pidof -s steam` | |
STEAMUSER=`ps -p $STEAMPID -o user=` | |
su $STEAMUSER -c steam steam://refreshinbox | |
fi | |
rm /tmp/steamos-update.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment