mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
removing CMD=$(which cmd) style things
This commit is contained in:
parent
d57d22661d
commit
c3eb5b99de
1 changed files with 11 additions and 20 deletions
|
@ -2,29 +2,23 @@ post_install (){
|
||||||
|
|
||||||
MODULE="mt7601"
|
MODULE="mt7601"
|
||||||
VERSION="v3.0.0.4"
|
VERSION="v3.0.0.4"
|
||||||
DKMS=$(which dkms)
|
|
||||||
MODPROBE=$(which modprobe)
|
|
||||||
CP=$(which cp)
|
|
||||||
MKDIR=$(which mkdir)
|
|
||||||
DEPMOD=$(which depmod)
|
|
||||||
|
|
||||||
# TODO: replace /usr/src with a variable.
|
# TODO: replace /usr/src with a variable.
|
||||||
SRCDIR=/usr/src/$MODULE-$VERSION
|
SRCDIR=/usr/src/$MODULE-$VERSION
|
||||||
|
|
||||||
$DKMS add -m $MODULE -v $VERSION
|
dkms add -m $MODULE -v $VERSION
|
||||||
$DKMS build -m $MODULE -v $VERSION
|
dkms build -m $MODULE -v $VERSION
|
||||||
$DKMS install -m $MODULE -v $VERSION
|
dkms install -m $MODULE -v $VERSION
|
||||||
|
|
||||||
# This file is read form a hardcoded location.
|
# This file is read form a hardcoded location.
|
||||||
# Can we put this in a standard location?
|
# Can we put this in a standard location?
|
||||||
PARAMSDIR="/etc/Wireless/RT2870STA"
|
PARAMSDIR="/etc/Wireless/RT2870STA"
|
||||||
$MKDIR -p $PARAMSDIR
|
mkdir -p $PARAMSDIR
|
||||||
$CP $SRCDIR/RT2870STA.dat $PARAMSDIR
|
cp $SRCDIR/RT2870STA.dat $PARAMSDIR
|
||||||
|
|
||||||
$DEPMOD -a $(uname -r)
|
depmod -a $(uname -r)
|
||||||
|
|
||||||
#$MODPROBE -a mt7601Usta mtutil7601Usta mtnet7601Usta
|
modprobe -a mt7601Usta
|
||||||
$MODPROBE -a mt7601Usta
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre_upgrade(){
|
pre_upgrade(){
|
||||||
|
@ -41,18 +35,15 @@ pre_remove (){
|
||||||
/usr/bin/rmmod mt7601 &> /dev/null
|
/usr/bin/rmmod mt7601 &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DKMS=$(which dkms)
|
|
||||||
|
|
||||||
_line=$($DKMS status -m mt7601)
|
_line=$(dkms status -m mt7601)
|
||||||
if echo "$_line" | grep -E 'added|built|installed'; then
|
if echo "$_line" | grep -E 'added|built|installed'; then
|
||||||
version=$(echo "$_line" | sed 's/mt7601,\([^,]*\)[,:].*/\1/;t;d')
|
version=$(echo "$_line" | sed 's/mt7601,\([^,]*\)[,:].*/\1/;t;d')
|
||||||
$DKMS remove -m mt7601 -v $version --all
|
dkms remove -m mt7601 -v $version --all
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RM=$(which rm)
|
rm -rf /etc/Wireless/RT2870STA
|
||||||
RMDIR=$(which rmdir)
|
rmdir --ignore-fail-on-non-empty /etc/Wireless
|
||||||
$RM -rf /etc/Wireless/RT2870STA
|
|
||||||
$RMDIR --ignore-fail-on-non-empty /etc/Wireless
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_remove () {
|
post_remove () {
|
||||||
|
|
Loading…
Reference in a new issue