WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] help if possible with a get script for firefox destined for 5.x series  (Read 3118 times)

gordonselfish

  • Guest
Hi

To save you reading too far.
I have created a get script that attempts to download the <input version> the local user supplies for firefox and
and/or as the script can be run again
create a home folder firefox which you update if you want OR
a private extension

I would love to submit this to my fav TCZ checker for the 5.x series but can not understand why the script is exitting at root,
I want it to exit as local user

The next post is the actual script

Moderators.....feel free to move this post if I should not post here
« Last Edit: September 05, 2013, 01:32:29 AM by gordonselfish »

gordonselfish

  • Guest
Re: help if possible with a get script for firefox destined for 5.x series
« Reply #1 on: September 04, 2013, 06:22:36 AM »
next is what happens for user selected "tcz" without the quotes....exits as root.....spank spank
Code: [Select]
tc@box:~$ sh firefox-get.sh
TRY AT OWN RISK. The download of firefox may take some time.
compiletc is already downloaded.
compiletc is already installed!
squashfs-tools-4.x is already downloaded.
squashfs-tools-4.x is already installed!
wget is already downloaded.
wget is already installed!

You may be able to page up or down by holding the shift key down and
pressing the page up (or) page down key.

Type the exact firefox version you would like to download. Examples are:
23.0.1 23.1.5
First version was correct at time of submission.
Version must match exactly. So if site says its eg 99.0 don't type 99

Then press enter
23.0.1
File `/home/tc/firefox.bz2' already there; not retrieving.

An existing firefox folder has been detected
either manually delete it or
run wolf and check for updates and update your firefox

You may be able to run this script again with different
choices but YMMV. The Choices are shown with some explanation and
then a short list is supplied and awaits your choice.

exit        Exit this script. You have downloaded firefox to your home folder.
            Hopefully, its unpacked.
##############################################################################
local       Assuming unpack worked, you choose to run firefox from
            your home folder. You now want me to give you a script in
          .local/bin called wolf so you can use a run command or
            open a terminal and type wolf....and firefox should open.
            no wbar or desktop entry is created in this option.

           This means you get the smallest size of updates rather than
           having to download a very large file (a second time or more).
           When browser is open, see Edit/preferences/Advanced/TAB=Update

            The main disadvantage - not a part of the
TC core concepts of pristine state.

For local choice,  be aware that you have a large bz2 file
in your home folder and a large sub-folder. You may like to
delete the bz2 file if script works.

Suggest you read the wiki on persistence and what effect will
occur to have large files in your backup.

.cache is already excluded from your backup
########################################################################
tcz      Create a private TCZ (TC extension)
tcz creation is unofficial, no support can be given.
Name of tcz is wolf.tcz. The executable in a terminal is wolf
wolf is a sym link to /usr/local/wolf/firefox
########################################################################
Make a choice, type exit or local or tcz and press enter
exit           Exit now
local          Create .local/bin/wolf executable
tcz            Create private wolf.tcz with executable wolf to run firefox
tcz
root@box:~#

gordonselfish

  • Guest
Re: help if possible with a get script for firefox destined for 5.x series
« Reply #2 on: September 04, 2013, 06:25:11 AM »
what has me puzzled.....but I get easily puzzled  ::)

the script builds the TCZ, I can load and run the tcz
the wbar icon works
---I am unable to see if the desktop entry works as I don't have a WM running ATM

thanks for reading

PS I did  google and attempted to code it as using the select function but my skills were not good enough.
« Last Edit: September 04, 2013, 06:30:50 AM by gordonselfish »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: help if possible with a get script for firefox destined for 5.x series
« Reply #3 on: September 04, 2013, 08:17:45 AM »
You do a 'su $USER2'
At that point you are no longer running the script.
The script will resume when you 'exit' $USER2's shell.

gordonselfish

  • Guest
Re: help if possible with a get script for firefox destined for 5.x series
« Reply #4 on: September 04, 2013, 04:17:20 PM »
gerald_clark

Thanks for helping, I would never have guessed.
that also explains why I never see my last echo command.....I will probably remove exit 1 but yet to test

I will have a go and report later

thanks heaps


gordonselfish

  • Guest
Re: help if possible with a get script for firefox destined for 5.x series
« Reply #5 on: September 05, 2013, 12:47:09 AM »
well I spoke too soon....again   ;D

independent open a fresh terminal and works as expected

Code: [Select]
tc@box:~$ sudo su
root@box:~# exit
tc@box:~$

do you think I could that easy exit to work in my script  No!

spat the dummy and left root out of it.....but have had to have a sudo chown to get root:root for some folders

will submit shortly as I expect no-one has the time to test
« Last Edit: September 07, 2013, 07:18:16 PM by gordonselfish »

gordonselfish

  • Guest
I have tested it a few times and now with submitqc5 for 5.x series

script removed as its now a submission that may land in repo ---if approved.

If anyone wants it in the meantime, send me a pm pls

thanks for reading

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
the plugin works for me, I have a few considerations:

1. if you put a version number wrong, script also creates an empty archive, this is not a problem, but when you go to create the TCZ these archives are also included in the package, creating different usr_1 usr_2 ... and wolf.desktop easily does not work
2. you can launch firefox only by wolf.desktop, launching wolf on the terminal get an error ("sh: wolf: not found")
3. if you do not enter the version number may be downloaded the latest version automatically (present in /pub/mozilla.org/firefox/releases/latest/linux-i686/en-US instead /pub/mozilla.org/firefox/releases/26.0/linux-i686/en-US)
4. if it was possible change the language (/pub/mozilla.org/firefox/releases/26.0/linux-i686/en-US)