Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: maro on October 20, 2013, 02:12:14 AM

Title: Support for KERNEL in tce-fetch.sh
Post by: maro on October 20, 2013, 02:12:14 AM
I just stumbled over the fact that '/usr/bin/tce-fetch.sh' still does not "know" what 'KERNEL' stands for. I believe the following trivial change could help in this matter:

Code: [Select]
--- tce-fetch.sh-old   2012-12-26 18:45:17.000000000 +0000
+++ tce-fetch.sh        2013-10-20 05:57:28.000000000 +0000
@@ -6,8 +6,10 @@
 getMirror
+KERNELVER=$(uname -r)
 if [ "$1" == "-O" ]; then
        shift
-       wget -cq -O- "$MIRROR"/"$1"
+       wget -cq -O- "$MIRROR"/"${1//-KERNEL.tcz/-${KERNELVER}.tcz}"
 else
-       [ -f "$1" ] && rm -f "$1"
-       wget -cq "$MIRROR"/"$1"
+       F="${1//-KERNEL.tcz/-${KERNELVER}.tcz}"
+       [ -f "$F" ] && rm -f "$F"
+       wget -cq "$MIRROR"/"$F"
 fi
Title: Re: Support for KERNEL in tce-fetch.sh
Post by: curaga on October 20, 2013, 05:08:30 AM
Would it be possible to get the patch as a file? Copying from the forum breaks all the whitespace.

http://patches.tinycorelinux.net/
Title: Re: Support for KERNEL in tce-fetch.sh
Post by: maro on October 20, 2013, 07:10:03 PM
OK, I've re-done the patch (since I had not even bothered to save it somewhere) and uploaded the file.

I had not even realised that TC has become that "fancy" with patch uploading etc.
Title: Re: Support for KERNEL in tce-fetch.sh
Post by: curaga on October 21, 2013, 11:11:22 AM
Thanks, applied.

We've always discouraged just posting patches as text, as it means manual work for everyone to apply it. Just that now we have our own upload service, so no need to use forum attachments or third-party hosters.