Attempting to write some shell scripts to aid compiling in Linux however it's being as awkward as possible to get working without issue 
So far I have is...
makefile:
package_kernel.sh:
Obviously something is wrong here and I think it's with my echos, running the script via the terminal (./package_kernel package.kgz) works as expected so I'm assuming there is some funky quirk I'm not yet aware of, would anyone mind enlightening me?

So far I have is...
makefile:
Code:
...
package:
$(shell ./package_kernel.sh $(VAR))
...
package_kernel.sh:
Code:
if [ $# -gt 0 ] ; then
echo Packaging kernel to $1...
gzip -9 kernel.bin -c > ../$1
echo Done!
else
echo No filename supplied, using default...
gzip -9 kernel.bin -c > ../Project_Evolution.kgz
echo Done!
fi
terminal said:ubuntu@ubuntu:/media/3A12-10C1/os$ make package VAR=package.kgz
Packaging kernel to package.kgz... Done!
/bin/sh: Packaging: not found
make: *** [package] Error 127
Obviously something is wrong here and I think it's with my echos, running the script via the terminal (./package_kernel package.kgz) works as expected so I'm assuming there is some funky quirk I'm not yet aware of, would anyone mind enlightening me?