summarylogtreecommitdiffstats
path: root/archdroid-icon-theme.install
diff options
context:
space:
mode:
Diffstat (limited to 'archdroid-icon-theme.install')
-rwxr-xr-xarchdroid-icon-theme.install71
1 files changed, 71 insertions, 0 deletions
diff --git a/archdroid-icon-theme.install b/archdroid-icon-theme.install
new file mode 100755
index 000000000000..0f030dd835a8
--- /dev/null
+++ b/archdroid-icon-theme.install
@@ -0,0 +1,71 @@
+_green() {
+ tput bold && tput setaf 2;
+ printf "%s" "${1}";
+}
+
+_blue() {
+ tput bold && tput setaf 4;
+ printf "%s" "${1}";
+}
+
+_white() {
+ tput bold && tput setaf 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;
+
+ go=(
+ "To enable icons for golang scripts, manually run this command:"
+ 'sudo echo "text/x-go go" | sudo tee -a /etc/mime.types'
+ );
+ _msg "${go[@]}";
+}
+
+post_upgrade() {
+ _gtkUpdate;
+
+ _credits;
+}
+
+post_remove() {
+ gtk-update-icon-cache;
+}
+
+# vim: ts=2 sw=2 et: