From 4453aa453765ebe682f65ec05496bf2521a17fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Ignacio=20Aramend=C3=ADa?= Date: Sun, 1 Jan 2012 17:46:53 -0300 Subject: [PATCH] Removed scripts directory and checked out the original Makefile from 'master' branch --- Makefile | 6 ----- scripts/install_dkms.sh | 57 ----------------------------------------- 2 files changed, 63 deletions(-) delete mode 100755 scripts/install_dkms.sh diff --git a/Makefile b/Makefile index b3c02bd..d2c88af 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,3 @@ clean: load: -/sbin/rmmod $(modname) /sbin/insmod $(modname).ko - -install_dkms_module: - ./scripts/install_dkms.sh install - -uninstall_dkms_module: - ./scripts/install_dkms.sh uninstall diff --git a/scripts/install_dkms.sh b/scripts/install_dkms.sh deleted file mode 100755 index 17862cd..0000000 --- a/scripts/install_dkms.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -uninstall_bbswitch_modules() -{ - local PKGVER="$(ls /usr/src/ | grep bbswitch | sed 's/^.*-//')" - - - # Warning: dmks say error if it doesn't know bbswitch module. - # This is the case for the first time, but it's not an error! - # TODO: Don't use the code below if PKGVER is empty (no return, - # no space...) - - - # Remove all version of bbswitch known by dkms - dkms remove -m bbswitch -v $PKGVER --all - depmod -a - - # Remove all sources of bbswitch - # Keep rm after dkms remove because this last use dkms.conf - rm -fr /usr/src/bbswitch-$PKGVER -} - - -install_bbswitch_module() -{ - # Before install, remove previous versions - uninstall_bbswitch_modules - - # Give a version to this bbswitch module - local GITVERSION=`git describe --tags` - - sudo mkdir -p "/usr/src/bbswitch-$GITVERSION" - - cp *.c "/usr/src/bbswitch-$GITVERSION" - cp Makefile "/usr/src/bbswitch-$GITVERSION" - cp ./dkms/dkms.conf "/usr/src/bbswitch-$GITVERSION" - - sed "s/REPLACE/$GITVERSION/" "/usr/src/bbswitch-$GITVERSION/dkms.conf" - - # Compilation and installation - dkms add -m bbswitch -v $GITVERSION - dkms build -m bbswitch -v $GITVERSION - dkms install -m bbswitch -v $GITVERSION - depmod -a - - #Now user can do : modprobe bbswitch -} - - -case $1 in - "install") install_bbswitch_module;; - - "uninstall") uninstall_bbswitch_modules;; - - *) echo "Error: Don't call this script directly";; -esac -