Created
October 10, 2012 21:51
-
-
Save dhornbein/3868702 to your computer and use it in GitHub Desktop.
Shell script that takes two arguments a size and name to produce a placeholder image
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 | |
# This script will tcreate a place holder image | |
if [ -z "$1" ] | |
then | |
echo "Please enter the size you wish to make (ex: 120x300) then press [ENTER]" | |
read size | |
else | |
size=$1 | |
fi | |
if [ -z "$2" ] | |
then | |
label=$size | |
else | |
label=$2 | |
fi | |
convert -background lightgrey -fill darkgrey -size $size -gravity center label:"$label" ./placehold-$label.jpg | |
echo "$PWD/placehold-$label.jpg - success!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment