25 lines
499 B
Bash
Executable file
25 lines
499 B
Bash
Executable file
#!/bin/sh
|
|
|
|
function usage() {
|
|
NAME=$(basename "$0")
|
|
echo "Usage: ${NAME} <source-icon> <output-directory>"
|
|
}
|
|
|
|
IN_FILE="$1"
|
|
OUT_DIR="$2"
|
|
|
|
if [[ ! -r "$IN_FILE" ]]; then
|
|
echo "Missing source icon, or file not found: $IN_FILE"
|
|
usage
|
|
exit 1
|
|
fi
|
|
if [[ ! -d "$OUT_DIR" ]]; then
|
|
echo "Missing output directory, or directory not found: $OUT_DIR"
|
|
usage
|
|
exit 2
|
|
fi
|
|
|
|
for SIZE in 29 40 60 76 83.5; do
|
|
echo "* Generating app icons at $SIZE points"
|
|
retina-scale $SIZE "$IN_FILE" "$OUT_DIR"
|
|
done
|