Skip to content

Instantly share code, notes, and snippets.

@cwvhogue
Created September 27, 2013 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cwvhogue/6731850 to your computer and use it in GitHub Desktop.
Save cwvhogue/6731850 to your computer and use it in GitHub Desktop.
Script to populate a Joyent Manta account with Getty Open Content originals, capped at 20.
#!/bin/bash
SITE="https://us-east.manta.joyent.com/mantademo/public/images/getty-open/"
DEST="/$MANTA_USER/public/"
# For more files change "-20" below to a larger number.
# For the complete download, remove "head -20 |" below
mmkdir -p ${DEST}/originals
curl -ksL ${SITE}/filelist.txt | head -20 | mput ${DEST}/filelist.txt
echo ${DEST}/filelist.txt | mjob create -m "xargs -I {} sh -c 'curl -ksL ${SITE}/originals/{} | mput ${DEST}/originals/{}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment