Last active
December 24, 2015 02:29
-
-
Save cwvhogue/6731498 to your computer and use it in GitHub Desktop.
Script to populate a Manta Account with demo Getty Open images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SITE="https://us-east.manta.joyent.com/mantademo/public/images/getty-open" | |
| DEST="/$MANTA_USER/public" | |
| echo Copy Demo JPEG files to your Manta Account as a tar file ... | |
| mjob create -w -r "curl -ksL ${SITE}/demojpgs.tar | mput ${DEST}/demojpgs.tar" < /dev/null | |
| echo Using muntar to extract the JPEG files on Manta ... | |
| echo ${DEST}/demojpgs.tar | mjob create -o -m 'muntar -f $MANTA_INPUT_FILE /$MANTA_USER/public' | |
| echo Downloading the JPEG files to your Local Machine into current directory `pwd` ... | |
| curl -k ${SITE}/demojpgs.tar -o demojpgs.tar | |
| tar -xvf demojpgs.tar | |
| echo Removing the tar files ... | |
| mrm ${DEST}/demojpgs.tar | |
| rm demojpgs.tar | |
| echo `mls ${DEST}/getty | wc -l` files extracted on Manta | |
| echo `pwd`/getty is the location of the local copy of the JPEG images. | |
| echo done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment