General TC > Programming & Scripting - Unofficial

Firefox - Extension to install the latest version

<< < (5/17) > >>

coreplayer2:
I've attached the latest script used in the new firefox-getlatest.tcz (extension) here

Lee:

--- Quote ---I've attached the latest script used in the new firefox-getlatest.tcz (extension) here
* firefox-getLatest.sh (14.3 kB - downloaded 3 times.)

--- End quote ---

I tried out this script under Core 4.7.7 / x86 and it worked except for one instance where the target of wget didn't explicitly start with either "http://" nor "ftp://".  Once I changed


--- Code: ---wget -q $latestVER
--- End code ---

to


--- Code: ---wget -q http://$latestVER
--- End code ---

it ran and produced the extension as expected.

Very nice!

It is, however, an  annoyance that the script goes so far as to add the new extension to onboot.lst.

(FWIW, its also annoys me that tce-load -wi adds things to onboot.lst.  Making an extension load onboot should be available but should be an "opt-in" choice, not an "opt-out" choice.)

gerald_clark:
Then don't do tce-load -iw.  Instead do
tce-load -w
tce-load -i

yiyus:
To be honest, the options are quite confusing.

When you want a new package, you can use -wi if you want to add it to onboot, -wo if you want to add it to ondemand, or -wil if you just want to install it for this session. If you only want to download it, you can use -w. Then, later you can install with -i, but the result you get is not like running -wi, it is like running -wil.

I find this not only counter intuitive, but also inconvenient, because I usually just want to try the package (so I use -wil) and decide later if I want to load it on boot, but I have to edit the onboot file for that, tce-load knows how to do it  but it does not handle this case.

Wouldn't it be more natural to have a flag to download, a flag to install, and a flag to add to onboot or ondemmand and combine these flags? I guess it would be hard to find the right moment to make a change like this, but I hope it eventually gets fixed.

(Sorry for the off-topic. The firefox extension looks good, but it has not hit the repos near to me yet).

coreplayer2:

--- Quote from: Lee on October 07, 2015, 02:40:50 PM ---I tried out this script under Core 4.7.7 / x86 and it worked except for one instance where the target of wget didn't explicitly start with either "http://" nor "ftp://".  Once I changed

--- Code: ---wget -q $latestVER
--- End code ---
to

--- Code: ---wget -q http://$latestVER
--- End code ---
it ran and produced the extension as expected.

Very nice!


--- End quote ---

Lee, I'm a little baffled by this because the address to download the web page with current release information always begins ftp.

The base address defined earlier in the script is always this, which includes ftp.
--- Code: ---latestVER="ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US"

--- End code ---
this address variable is then modified during the architecture check and then again during a locale check

--- Code: ---latestVER=${latestVER/linux-i686/linux-x86_64}
--- End code ---
parameter substitution replaces arch (and locale). therefore (assuming en_US locale, the result can only be either
ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US , or
ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US



Interestingly this is not related to the Firefox archive download and placing http in front an ftp address should have failed to determine the current release version. 
so I think there is possibility the script failed because of some other reason,  perhaps during one of the intentional connection checks.  Then when you tried again the connection quality had improved.. 

Please try again after removing the http://  prefix, I'm anxious to hear the result

:)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version