_color() { tput bold && tput setaf "${1}"; if ! [ "${2}" ]; then return; fi; printf "%s" "${2}"; } _green() { _color "2" "${1}"; } _blue() { _color "4" "${1}"; } _white() { _color "7"; for line ; do echo "${line}" ; done ; } _msg() { _green "==> "; _white "$@"; tput sgr 0; } _msg2() { _blue " -> "; _white "$@"; tput sgr 0; } _gtkUpdate() { _msg "Updating icon cache"...; a="Archdroid"; Colors=( Amber ArchBlue Blue BlueGrey Brown Cyan DeepOrange DeepPurple Green Grey Indigo KellyGreen LightBlue LightGreen Lime Orange Pink Purple Red Shamrock Teal Yellow ); for c in "${Colors[@]}"; do t="${a}-${c}"; d="usr/share/icons/${t}"; _msg2 "${t}"; gtk-update-icon-cache -ftq "${d}"; done; } _credits() { _msg "Credits to Google, Ubuntu Mono, Mint-X, and Numix for this theme"; } post_install() { _gtkUpdate; _credits; } post_upgrade() { _gtkUpdate; _credits; } post_remove() { gtk-update-icon-cache; } # vim: ts=2 sw=2 et: