Skip to content

Commit

Permalink
gdev: fixed autogen.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinpei Kato committed Mar 30, 2012
1 parent 4a6906e commit ee21c60
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions common/autogen.sh
@@ -1,19 +1,14 @@
#!/bin/sh

pscnv_exist=$(lsmod | grep pscnv | wc -l)
nouveau_exist=$(lsmod | grep nouveau | wc -l)
nvidia_exist=$(lsmod | grep nvidia | wc -l)
driver=''

if [ ! $pscnv_exist -eq 0 ] ; then
driver='pscnv'
DRIVER='PSCNV'
elif [ ! $nouveau_exist -eq 0 ] ; then
driver='nouveau'
DRIVER='NOUVEAU'
elif [ ! $nvidia_exist -eq 0 ] ; then
if [ ! $(lsmod | grep nvidia | wc -l) -eq 0 ] ; then
driver='nvi'
DRIVER='NVI'
elif [ ! $(lsmod | grep nouveau | wc -l) -eq 0 ] ; then
driver='nouveau'
DRIVER='NOUVEAU'
elif [ ! $(lsmod | grep pscnv | wc -l) -eq 0 ] ; then
driver='pscnv'
DRIVER='PSCNV'
fi

echo "Detecting device driver... $driver"
Expand Down

0 comments on commit ee21c60

Please sign in to comment.