I have TCL installed on my laptop, and sometimes I am in places where no internet connection is available, and loading linux-kernel-sources-env.sh is impossible because it depends on an active connection to load his components.
What I did is to download the files Module.symvers-4.14.10-tinycore.gz, config-4.14.10-tinycore and linux-4.14.10-patched.txz to /opt and write this in /opt/bootlocal.sh
ln -s /opt/Module.symvers-4.14.10-tinycore.gz /tmp/Module.symvers-4.14.10-tinycore.gz
ln -s /opt/config-4.14.10-tinycore /tmp/config-4.14.10-tinycore
ln -s /opt/linux-4.14.10-patched.txz /tmp/linux-4.14.10-patched.txz
so the script can load those files from the disk, but was still failing, then I tried to look at the code, after a review I did this:
#for s in $kersrc ; do
#echo "checking repo for $s"
#wget --spider -T 20 "${srchttp}/$s"
#case $? in
#0) k_patched="$s"; break;;
#esac
#done
k_patched="linux-${kerver%-*}-patched.txz"
echo "linux-${kerver%-*}-patched.txz"
in few words, I commented the whole loop and added the last two lines, with that change the script skips the internet search and extract the files normally, I consider this important to be fixed, in case the files are available on disk, skip the internet search