diff --git a/bin/singleIco b/bin/singleIco deleted file mode 100755 index 3947478..0000000 --- a/bin/singleIco +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -# USAGE - -# ./extractIco -# Make sure the output extension is '.ico'! - -# Example -# ./extractIco.sh ~/SOME_MULTIPLE_ICO.png ~/Desktop/SINGLE.ico - -# Exec Paths -IMAGEMAGICK_CONVERT=$(which convert) -IMAGEMAGICK_IDENTIFY=$(which identify) - -if [ ! -x "${IMAGEMAGICK_CONVERT}" ]; then - echo "Cannot find required ImageMagick Convert executable" >&2 - exit 1; -fi -if [ ! -x "${IMAGEMAGICK_IDENTIFY}" ]; then - echo "Cannot find required ImageMagick Identify executable" >&2 - exit 1; -fi - -# Parameters -SOURCE=$1 -DEST=$2 - -# Check source and destination arguments -if [ -z "${SOURCE}" ]; then - echo "No source image specified" >&2 - exit 1 -fi - -if [ -z "${DEST}" ]; then - echo "No destination specified" >&2 - exit 1 -fi - -# check if source exists -if [ ! -f "${SOURCE}" ]; then - echo "Source file not found" >&2 - exit 1 -fi - -# File Infrastructure -NAME=$(basename "${SOURCE}") -EXT="${NAME##*.}" -BASE="${NAME%.*}" -TEMP_DIR="${BASE}.iconset" - -if [ "${EXT}" != "ico" ]; then - echo "Source file is not a .ico" >&2 - exit 1 -fi - -# check if .ico is a sequence -IS_ICO_SET="$(identify ${SOURCE} | grep -e "\w\.ico\[0")" - -if [ "${IS_ICO_SET}" ]; then - mkdir "${TEMP_DIR}" - - # extract the largest(?) image from the set - convert "${SOURCE}" "${TEMP_DIR}/${BASE}.png" - convert "${TEMP_DIR}/${BASE}-0.png" "${DEST}" - - # Clean up the temp dir - rm -rf "${TEMP_DIR}" -else - cp "${SOURCE}" "${DEST}" -fi - diff --git a/src/build/iconBuild.js b/src/build/iconBuild.js index bbcdb97..bda0aa3 100644 --- a/src/build/iconBuild.js +++ b/src/build/iconBuild.js @@ -3,7 +3,7 @@ import helpers from './../helpers/helpers'; import iconShellHelpers from './../helpers/iconShellHelpers'; const {isOSX} = helpers; -const {singleIco, convertToPng, convertToIcns} = iconShellHelpers; +const {convertToPng, convertToIcns} = iconShellHelpers; /** * @callback augmentIconsCallback