docsmooth / vmware-bumblebee

Bash Script to start VMware Workstation under Bumblebee Primus/Optimus hybrid drivers
GNU General Public License v2.0
28 stars 10 forks source link

Wrong OS detection on Arch Linux, when dpkg package is installed #15

Open invidian opened 8 years ago

invidian commented 8 years ago

Hi, I have following problem. I'm using Arch Linux and I have dpkg package installed (sometimes required to repack something from deb to .pkg.tar.xz).

Maybe someone (maybe even me) will find some time to fix that :)

Here is the log:

$ bash -x ./vmplayer-bumblebee 
+ gVers=2.0
+ ACADAPTER=/sys/class/power_supply/AC
+ BATTERY=/sys/class/power_supply/BAT0
+ FORCE3D=a
+ DO3D=n
++ basename ./vmplayer-bumblebee
+ scriptname=vmplayer-bumblebee
+ echo
+ egrep -q -w '(help|h|\?)'
+ '[' 1 -eq 0 ']'
++ which gksudo
+ '[' -x /usr/bin/gksudo ']'
++ which gksudo
+ SUDO='/usr/bin/gksudo -k'
+ determineos
++ uname -p
+ ARCH=unknown
+ '[' unknown = unknown ']'
++ uname -m
+ ARCH=x86_64
+ '[' x86_64 = unknown ']'
++ which dpkg
+ '[' /usr/bin/dpkg ']'
+ OStype=deb
++ grep -c -i ubuntu /etc/os-release
+ '[' 0 -gt 0 ']'
+ grep -q debian /etc/os-release
+ NVIDIA_DEST32=
+ '[' -d /linux-gnu ']'
+ NVIDIA_DEST64=
+ '[' -d /linux-gnu ']'
+ '[' x86_64 = x86_64 -o x86_64 = amd64 ']'
+ ULIB=
+ LIB=
+ NVIDIA_DEST=
+ '[' -z ']'
+ echo 'ERROR: Couldn'\''t determine paths properly!'
ERROR: Couldn't determine paths properly!
+ exit 2
docsmooth commented 8 years ago

I'll put the arch detection earlier in the script, since it's less likely to be hit to solve this, once we can close bug #16