WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Support for KERNEL in tce-fetch.sh  (Read 2012 times)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Support for KERNEL in tce-fetch.sh
« 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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Support for KERNEL in tce-fetch.sh
« Reply #1 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/
The only barriers that can stop you are the ones you create yourself.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Support for KERNEL in tce-fetch.sh
« Reply #2 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Support for KERNEL in tce-fetch.sh
« Reply #3 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.
The only barriers that can stop you are the ones you create yourself.