Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Jan 2018, 20:30
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to run many pets from a script? [SOLVED]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
davids45


Joined: 26 Nov 2006
Posts: 1029
Location: Chatswood, NSW

PostPosted: Wed 13 Dec 2017, 23:33    Post subject:  How to run many pets from a script? [SOLVED]
Subject description: Or combine many pets into one
 

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, 17:40; edited 1 time in total
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 805

PostPosted: Thu 14 Dec 2017, 00:34    Post subject: Re: Run many pets from a script
Subject description: Or combine many pets into one
 

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.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1434
Location: Japan

PostPosted: Thu 14 Dec 2017, 03:29    Post subject: Re: Run many pets from a script
Subject description: Or combine many pets into one
 

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:
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
Back to top
View user's profile Send private message 
davids45


Joined: 26 Nov 2006
Posts: 1029
Location: Chatswood, NSW

PostPosted: Thu 14 Dec 2017, 21:07    Post subject: petget  

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 Shocked Smile .
I might start with just one pet and petget?

Thanks,

David S.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1434
Location: Japan

PostPosted: Thu 14 Dec 2017, 23:16    Post subject:  

This old thread might give you some inspirations:
How to install a Pet file from the command line?
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1506
Location: Italy

PostPosted: Fri 15 Dec 2017, 01:32    Post subject:  

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.
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1480
Location: The other Mr. 305

PostPosted: Sat 23 Dec 2017, 11:32    Post subject:  

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.
Back to top
View user's profile Send private message 
davids45


Joined: 26 Nov 2006
Posts: 1029
Location: Chatswood, NSW

PostPosted: Sat 23 Dec 2017, 17:39    Post subject: MochiMoppel script works
Subject description: Install many pets in single step/script
 

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 Very Happy .

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 Embarassed ) 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 Shocked , as well as telling me if a particular pet/app is already installed Smile .

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0543s ][ Queries: 14 (0.0119s) ][ GZIP on ]