aorg-sync.sh
synchronizes a remote archive.org item folder with the local directory.
It tries to minimize network traffic by checking file sizes, last modified times and md5 hashes against item metadata exposed by archive.org.
You can run this on the MisterFPGA itself or on another Linux host.
cp aorg-sync.sh /media/fat/Scripts
mkdir -p /media/fat/games/AO486/0mhz && cd /media/fat/games/AO486/0mhz
/media/fat/Scripts/aorg-sync.sh # Will sync into /media/fat/games/AO486/0mhz
All user-configuration options can be overridden through the environment:
REMOTE=foo ./aorg-sync.sh # Will sync https://archive.org/download/foo
If you’re executing this script on macOS or another BSD, you’ll need GNU coreutils,
GNU grep (or pcregrep) and GNU find installed (e.g. from macports or homebrew)
as the BSD versions of touch
, grep
, find
and stat
do not support the same
features. The MisterFPGA Linux distribution has all required dependencies installed.
If the script is reporting a self signed certificate in certificate chain
error,
follow the directions shown here to install missing certificates,
or run the script with --no-check-cert
.
This is free and unencumbered software released into the public domain.
xristos (AT) sdf (DOT) org