[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Whats wrong with this script ?



* Dr. Sachin Kale (sauravsk@agd2.dot.net.in) [020813 20:22]:
> I am trying to get a module compiled against kernel 2.2.12-20, work on
> 2.2.19; I found this script on the net, when I run this as
>  ./fixscript esscom.o esscom.fix.o I get the error -
> 
> ./fixscript1: $MI: ambiguous redirect
> ./fixscript1: line 5: syntax error near unexpected token `do '
> ./fixscript1: line 5: ` do '
> 
> Here is the original script -
> 
> MI=/tmp/modinfo [ -z "$DEPMOD" ] && DEPMOD=depmod #new kernel version
> modinfo section
> echo -ne "kernel_version="`uname -r`"\0" > $MI #build the objcopy
> command
> CMD="objcopy"
> for i in `$DEPMOD -e $1 2>&1 | sed 's/depmod://g' | grep -vE
> "^$1:|Unresolved symbols|^#"` ; do

The above 2 lines look like they should be one line.

Also, add a shebang (#!/bin/(ba)sh) as the first line of the script, for
good measure.

(I haven't carefully inspected the rest of it, but that's the first
thing I noticed that's wrong, and that would cause complaint about a
misplaced `do'.)

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
"As we enjoy great advantages from inventions of others, we should be glad
of an opportunity to serve others by any invention of ours; and this we
should do freely and generously."  --Benjamin Franklin

Attachment: pgpeRRmW1E0I5.pgp
Description: PGP signature


Reply to: