I have written the following code..
installFunction(){
perl Makefile.PL
flag1 = $?
make
flag2 = $?
make install
flag3 = $?
make test
flag4 = $?
cd ..
return $flag1 || $flag2 || $flag3 || $flag4
}
if(installFunction != 0)
then
echo "installation failure"
exit
fi
But when I run the code , Im getting the following error
./install: 53: flag1: not found
./install: 53: flag2: not found
./install: 53: flag3: not found
./install: 53: flag4: not found
Could anyone say what the problem is?
Thanks in advance!!
try
notice the lack of spaces.
http://tldp.org/LDP/abs/html/varassignment.html
And as kev mentioned, your
ifstatement is invalid.should work. obligatory link: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html