Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Commit

Permalink
Updated .install file
Browse files Browse the repository at this point in the history
  • Loading branch information
Samsagax committed Jan 13, 2012
1 parent a5a78c6 commit 889702e
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions bumblebee-git/bumblebee.install
@@ -1,32 +1,3 @@
_replace_busid() {
NVIDIABUSID=$(lspci -d 10de: -n | grep '030[02]:' | cut -d' ' -f1 | tr . :)

case $(wc -l <<<"$NVIDIABUSID") in
0)
echo "The BusID of the nVidia card can't be determined."
echo "You must set that manually in $1"
;;
1)
NVIDIABUSID="PCI:$NVIDIABUSID"
#echo "Detected Bus ID: $NVIDIABUSID"
;;
*)
# You'll never know.
echo "Multiple graphics cards are not supported by Bumblebee yet. The"
echo "following PCI Bus IDs have been detected:"
echo "$NVIDIABUSID"
echo "If this information is wrong, please report it to:"
echo "https://github.com/Bumblebee-Project/Bumblebee/issues"
# empty the ID so we can detect this as error
NVIDIABUSID=
;;
esac

re_busid='^( *BusID +")[^"]*'

sed -E -i "$1" -e "s,${re_busid},\1${NVIDIABUSID},"
}

_backup() {
cp "$1" "$1.pacsave"
#echo "File $1 backed up as $1.pacsave"
Expand Down Expand Up @@ -61,11 +32,9 @@ pre_upgrade() {

post_upgrade() {
if [ -f /etc/bumblebee/xorg.conf.nvidia ]; then
_replace_busid /etc/bumblebee/xorg.conf.nvidia
_restore /etc/bumblebee/xorg.conf.nvidia
fi
if [ -f /etc/bumblebee/xorg.conf.nouveau ]; then
_replace_busid /etc/bumblebee/xorg.conf.nouveau
_restore /etc/bumblebee/xorg.conf.nouveau
fi
groupadd bumblebee && echo "Bumblebee group created"
Expand All @@ -91,17 +60,5 @@ post_remove() {
}

post_install() {
if [ -f /etc/bumblebee/xorg.conf.nvidia ]; then
_replace_busid /etc/bumblebee/xorg.conf.nvidia
fi
if [ -f /etc/bumblebee/xorg.conf.nouveau ]; then
_replace_busid /etc/bumblebee/xorg.conf.nouveau
fi
groupadd bumblebee && echo "Bumblebee group created"
echo
echo "Installation complete..."
echo "Visit ArchWiki page on Bumblebee for documentation on how to finish setup,"
echo "configure and run applications with Bumblebee:"
echo "http://wiki.archlinux.org/index.php/Bumblebee"
echo
}

0 comments on commit 889702e

Please sign in to comment.