A Frugal addendum: Downloading multiple files with Squirt

Since the Get Frugalware page doesn’t list any torrent trackers, I figured that this would be a good opportunity to test the regex aware capabilities of Squirt. Originally, I expected to include a one-paragraph note in my previous post but, as you will see, this expanded to the point that I decided a separate post was warranted.

The closest FTP mirror listed for me was, of course, the Belgian one. There are a lot of files in the stable ISO folder and all I really want to download are the four DVD images. With as little intervention as possible. This is the point at which I saw an opportunity to see how well Squirt would work with a real-world regex search on a previously untried server.

First, the script:
squirt build getfrugal --host=ftp5.frugalware.org --user=ftp --local=/home/paul/Torrents --remote=/packages/frugalware/pub/frugalware/frugalware-stable-iso/ --do=get --files=x86_64-dvd[1-9].iso$

Because this is an anonymous ftp connection, --user=ftp and --pass is not populated.

The regex is in the --files paramater: The [0-9] tells squirt to match any numeric value and the $ tells it to match the end of the string (so it selects the .iso files and ignores the .iso.lst and .iso.ls-Ral files.

Then I execute the script:
squirt exec getfrugal

The first run was less than successful. Downloading files this big leads to FTP timeouts, at which point things start to get messy. So to validate the regex is working, I tried this:

$ squirt exec getfrugal --do=ls
-rw-r--r-- 1 ftp ftp 4483710976 Feb 12 00:01 frugalware-1.6-x86_64-dvd1.iso
-rw-r--r-- 1 ftp ftp 4486856704 Feb 12 00:04 frugalware-1.6-x86_64-dvd2.iso
-rw-r--r-- 1 ftp ftp 4488953856 Feb 12 00:07 frugalware-1.6-x86_64-dvd3.iso
-rw-r--r-- 1 ftp ftp 4465885184 Feb 12 00:10 frugalware-1.6-x86_64-dvd4.iso

All four DVD ISOs, and nothing else, were successfully identified. So I can start claiming that Squirt is a regex compliant command line FTP client (how’s that for snappy?) but I can’t (yet) make any claims that it will work for large files.

So that’s my next task lined up.

One thought on “A Frugal addendum: Downloading multiple files with Squirt

Comments are closed.