How to run many pets from a script? [SOLVED]

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

How to run many pets from a script? [SOLVED]

#1 Post by davids45 »

G'day,

How can I run, easily and simply, a sequence of pets in a new Pup?

I have about twenty pets I'd like to run in each new Full Pup.

They're all small pets and don't take long to install, but as there are so many, I find it awkward to keep track of which I'm up to.

Is there a script that would run, say twenty pets, in sequence, from a pets directory on one partition to a Pup on another partition?

Alternatively, can pets be simply combined like sfs - although updates to large multi-component pets/sfs are a bit tiresome. Tweaking a small stand-alone pet seems easier.

Thanks for any inspired responses.

David S.
Last edited by davids45 on Sat 23 Dec 2017, 21:40, edited 1 time in total.

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Re: Run many pets from a script

#2 Post by s243a »

davids45 wrote:G'day,

How can I run, easily and simply, a sequence of pets in a new Pup?

I have about twenty pets I'd like to run in each new Full Pup.

They're all small pets and don't take long to install, but as there are so many, I find it awkward to keep track of which I'm up to.

Is there a script that would run, say twenty pets, in sequence, from a pets directory on one partition to a Pup on another partition?

Alternatively, can pets be simply combined like sfs - although updates to large multi-component pets/sfs are a bit tiresome. Tweaking a small stand-alone pet seems easier.

Thanks for any inspired responses.

David S.
Use the petget command and loop through them in a bash script.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: Run many pets from a script

#3 Post by MochiMoppel »

davids45 wrote:Is there a script that would run, say twenty pets, in sequence, from a pets directory on one partition to a Pup on another partition?.
Well, there is a script and it can do what you want (and a bit more). Only problem: It's my personal script and I've never published it, so I don't know if it is useful for others. It's a completely rewritten petget and a bugfixed installpkg.sh. Send me a PM if you dare to try it. I use it daily and it works for me, but I haven't touched the code for years and I can't promise that I still could fix it :wink:

Here is the usage info:

Code: Select all

MochiMoppel's petget v.1.06
Usage: petget [OPTIONS...] PKGFILES... | PKGFOLDER | TEXTFILE

PKGFILES:  full path(s) of packages(s)
PKGFOLDER: folder containing  pkgfiles (non pkgfiles will be ignored)
TEXTFILE:  textfile containing full paths and/or URLs of pkgfiles
           (each filepath/URL on separate line)

Options:
-f: force           install even if pkg is already installed
                    with -a or -A : try download even if already downloaded
-q: quiet           no GUI dialogs/splash pop-ups
                    (-q set by default when run in terminal/terminal emulator)
-Q: almost quiet    no GUI dialogs, only splash pop-ups
                    (changes to -q when run in terminal/terminal emulator)
-t <TEXTFILE>:      read filespecs of pkgs from TEXTFILE
                    (each filespec in TEXTFILE on separate line)
-u: uninstall       uninstall PKGFILES/PKGFOLDER/TEXTFILE
                    w/o PKGFILES/PKGFOLDER/TEXTFILE: list installed pkgs
-w <DIRECTORY>      working directory (default is /tmp)
-x: invert select.  Invert selection default in initial confirmation dialog
                    sets Install:all unselected;Uninstall:all selected 
-y: always display  show GUI elements in child scripts
                    (by default pesky dialogs in some child scripts are stifled
                    by setting DISPLAY=. This option never changes DISPLAY)

Additional options for URL filespecs:
-a: accelerate      accelerate downloads. Bypass /usr/sbin/download_file,
                    skip all pre-download checks
-A: axel            same as -a, but use axel (if installed) instead of wget                   
-d <DIRECTORY> :    download dir (default:/root); no effect if -i opt set
-i: install only    install and discard downloaded pkgs
-n: no install      download, but don't install (=download-only)

Supported pkg types: *.pet|*.deb|*.tgz|*.txz|*.rpm|*.tar.gz

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

petget

#4 Post by davids45 »

G'day s243a and MochiMoppel,

You've both suggested petget could do this - thank you - I was assuming petget only worked with on-line repositories, so if it will install pets from one drive to another on this computer, that's good news.

My concern was also that with a script, I could have two or more pets being installed at the same time which may not be good? So how to only start the next pet install when the current one has finished?

I'll have a look at petget and MochiMoppel's script and get back to you.

I'm pretty sure there's nothing much that can go wrong, but I think I've thought that before :shock: :) .
I might start with just one pet and petget?

Thanks,

David S.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#5 Post by MochiMoppel »

This old thread might give you some inspirations:
How to install a Pet file from the command line?

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#6 Post by watchdog »

http://murga-linux.com/puppy/viewtopic.php?t=57548

I think alien2puppy script by 01micko can build a single pet package from several pet packages. Just try it.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#7 Post by slavvo67 »

Not sure if I get it. Are you looking to install, say a directory full of pets onto a new Puppy or Quirky?

I have scripts for that, too but Mochi's scripts are probably cleaner and better focused.

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

MochiMoppel script works

#8 Post by davids45 »

G'day,

An update on my request.

I'm very impressed by MochiMoppel's script (thank you MM for the emailed script of your modified petget and follow-up help).

This script does what I wanted as a quick and simple way for adding many applications and profiles, as .pet files, to a new Full Pup.

I can now add a folder of pets to a new Full Pup. These are not pets in an on-line repository, but "my" pets already stored on my computer, shared out to all new Full Pups I install. I already make large sfs of apps, profiles, etc. for Frugal Pups.

So, to best use this script, I'm now breaking my large and complex old pets into smaller individual pets.
I can now mix and match my small pets to the Pup, as each Pup (e.g. Slacko, Stretch, Xenial) is slightly different. Some apps need an extra lib or two in one Pup but not in another, and some Pups already include an app I want, while another may not.

Keeping my pets as individual pets now makes updates easier - in a combined pet, this was a bit awkward. Of course, only if the update is actually an upgrade!

My "P.B." is to add a folder of 38 pets to a new Pup in less than a minute with the script. The pets were all made with links to the 'full' files stored on my mounted data partition on sda5 so each pet installation was quite quick anyway as these links-pets are often under 1kB. But I did it in one step not 38 steps :D .

Just very convenient to now run a single script to 'personalise' a new Full Pup with my applications, drivers, and profiles.
The harder part is now to create my pets (and have them error-free :oops: ) and then make a folder of the needed pets for each Pup 'breed' - a Slacko folder, a Stretch folder, a Xenial folder, and so on.

For lazy users like me, a gui to run MM's script would be very helpful.
A dialog box input would identify the folder of pets to install and another input would select which partition or Pup to install the pets folder into.

The resulting terminal responses are very helpful in finding which pets have bugs or problems :shock: , as well as telling me if a particular pet/app is already installed :) .

Slavvo67,
Thank you for your post. I'm happy to try your script if you'd like - I hope the above clarifies my need as I do want to do what you asked in your post - "Are you looking to install, say a directory full of pets onto a new Puppy or Quirky?" (Quick Answer=Yes).

Thanks again to MochiMoppel,

David S.

Post Reply