This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
portfolio-site/add-iamge.sh

19 lines
316 B
Bash
Raw Normal View History

2019-12-07 20:41:23 -06:00
#!/usr/bin/env bash
IMG=$1
if ! [ -f $IMG ]; then
echo "Please specify a path to an image"
exit
fi
PATHFULL=assets/images/full
PATH420=assets/images/420
mkdir -p $PATHFULL $PATH420
file=$(basename $IMG)
convert $IMG -resize 420x420 "${PATH420}/${file%.*}.png"
convert $IMG "${PATHFULL}/${file%.*}.png"