|
Subject: revision 3842 committed Newsgroups: gmane.linux.drivers.madwifi.cvs Date: 2008-08-04 12:11:33 GMT (22 weeks, 4 days, 15 hours and 59 minutes ago)
Project : madwifi
Revision : 3842
Author : proski (Pavel Roskin)
Date : 2008-08-04 14:11:33 +0200 (Mon, 04 Aug 2008)
Log Message :
Make "make install" non-interactive
Copy scripts/find-madwifi-modules.sh from trunk
Affected Files:
* madwifi/branches/madwifi-0.9.4/Makefile updated
* madwifi/branches/madwifi-0.9.4/scripts/find-madwifi-modules.sh updated
Modified: madwifi/branches/madwifi-0.9.4/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/Makefile 2008-08-01 03:35:34 UTC (rev 3841)
+++ madwifi/branches/madwifi-0.9.4/Makefile 2008-08-04 12:11:33 UTC (rev 3842)
@@ -87,7 +87,7 @@
install-modules:
@# check if there are modules left from an old installation
@# might cause make to abort the build
- sh scripts/find-madwifi-modules.sh $(KERNELRELEASE) $(DESTDIR)
+ sh scripts/find-madwifi-modules.sh -r $(KERNELRELEASE) $(DESTDIR)
for i in $(obj-y); do \
$(MAKE) -C $$i install || exit 1; \
Modified: madwifi/branches/madwifi-0.9.4/scripts/find-madwifi-modules.sh
===================================================================
--- madwifi/branches/madwifi-0.9.4/scripts/find-madwifi-modules.sh 2008-08-01 03:35:34 UTC
(rev 3841)
+++ madwifi/branches/madwifi-0.9.4/scripts/find-madwifi-modules.sh 2008-08-04 12:11:33 UTC
(rev 3842)
@@ -6,14 +6,35 @@
echo "(including all its subdirectories)."
echo
echo "Usage:"
- echo "$0 <kernelrelease> [destdir]"
+ echo "$0 [-l] [-r] <kernelrelease> [destdir]"
echo
echo "<kernelrelease>: the kernel release that madwifi has been compiled for"
echo "[destdir]: destination directory for the compiled madwifi modules (optional)"
+ echo "-l list the modules we find."
+ echo "-r remove the modules we find."
+ echo "If neither -l or -r is specified, the user will be prompted."
echo
exit 1
fi
+LIST_CMD=0
+REMOVE_CMD=0
+while [ 1 ]; do
+ case $1 in
+ -l)
+ LIST_CMD=1
+ shift;
+ ;;
+ -r)
+ REMOVE_CMD=1
+ shift;
+ ;;
+ *)
+ break;
+ ;;
+ esac;
+done;
+
KVERS="${1}"
if [ -n "${2}" ]; then
@@ -24,47 +45,58 @@
SEARCH="${KDEST}/lib/modules/${KVERS}"
-PATTERN="^.*\/(ath_(hal|pci|rate_(onoe|amrr|sample))\.k?o)|(wlan(_(acl|ccmp|scan_(ap|sta)|tkip|wep|xauth))?\.k?o)$"
+PATTERN="^.*\/(ath_(hal|pci|rate_[^.]*)\.k?o)|(wlan(_(acl|ccmp|scan_(ap|sta)|tkip|wep|xauth))?\.k?o)$"
OLD_MODULES=$(find ${SEARCH} -type f -regex '.*\.k?o' 2>/dev/null | grep -w -E "${PATTERN}")
+
+
if [ -n "${OLD_MODULES}" ]; then
- echo ""
- echo "WARNING:"
- echo "It seems that there are modules left from previous MadWifi installations."
- echo "If you are unistalling the MadWifi modules please press \"r\" to remove them."
- echo "If you are installing new MadWifi modules, you should consider removing those"
- echo "already installed, or else you may experience problems during operation."
- echo "Remove old modules?"
-
- while true; do
- echo
- echo -n "[l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ? "
- echo
- read REPLY
- case ${REPLY} in
- l|L)
- for m in ${OLD_MODULES}; do echo ${m}; done
- continue
- ;;
+ if [ "$LIST_CMD" -eq 1 ] || [ "$REMOVE_CMD" -eq 1 ]; then
+ if [ "$LIST_CMD" -eq 1 ]; then
+ for m in ${OLD_MODULES}; do echo ${m}; done
+ fi;
+ if [ "$REMOVE_CMD" -eq 1 ]; then
+ rm -f ${OLD_MODULES}
+ fi;
+ else
+ echo ""
+ echo "WARNING:"
+ echo "It seems that there are modules left from previous MadWifi installations."
+ echo "If you are unistalling the MadWifi modules please press \"r\" to remove them."
+ echo "If you are installing new MadWifi modules, you should consider removing those"
+ echo "already installed, or else you may experience problems during operation."
+ echo "Remove old modules?"
+
+ while true; do
+ echo
+ echo -n "[l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ? "
+ echo
+ read REPLY
+ case ${REPLY} in
+ l|L)
+ for m in ${OLD_MODULES}; do echo ${m}; done
+ continue
+ ;;
+
+ r|R)
+ rm -f ${OLD_MODULES}
+ exit
+ ;;
- r|R)
- rm -f ${OLD_MODULES}
- exit
- ;;
+ i|I)
+ exit 0
+ ;;
- i|I)
- exit 0
- ;;
+ x|X)
+ exit 1
+ ;;
- x|X)
- exit 1
- ;;
-
- *)
- continue
- ;;
- esac
- done
+ *)
+ continue
+ ;;
+ esac
+ done
+ fi;
fi
exit 0
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
|
|
|