/
githubmirror
/
nativefier
Обзор
Документация
Войти
/
githubmirror
/
nativefier
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
icon-scripts/convertToTrayIcon
32 строки
540 B
Fabian Wolf
macOS: Fix crash when using --tray (fix #527), and invisible icon (fix #942, fix #668) (#1156)
29 апр 2021, 03:25
Не верифицирован
29 апр 2021, 03:25
cf8e51e
Код
Авторство
О чём код?
#!/usr/bin/env bash # USAGE # ./convertToTrayIcon <input png or icns> <outfilename>.png # Example # ./convertToTrayIcon ~/sample.icns ~/converted.png set -e SOURCE=$1 DEST=$2 if [ -z "${SOURCE}" ]; then echo "No source image specified" exit 1 fi if [ -z "${DEST}" ]; then echo "No destination specified" exit 1 fi NAME=$(basename "${SOURCE}") EXT="${NAME##*.}" if [ "${EXT}" == "png" ]; then cp "${SOURCE}" "${DEST}" exit 0 fi sips --setProperty format png --resampleHeightWidth "256" "256" "${SOURCE}" --out "${DEST}"