Skip to content

Instantly share code, notes, and snippets.

@o314
Created April 8, 2020 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o314/362ddca3ee477339ccf86b0cea2cd9ef to your computer and use it in GitHub Desktop.
Save o314/362ddca3ee477339ccf86b0cea2cd9ef to your computer and use it in GitHub Desktop.
conf-unity-icons
# for unity gui
DST_BASE="/usr/share/icons/Humanity/mimes"
for mime in *; do
[ -e "$mime" ] || continue
[ -d "$mime" ] || continue
echo "conf mime-type ${mime}"
for size in ${mime}/*.svg; do
[ -e "$size" ] || continue
src="$size"
dst_fn=$(echo "${size}" | sed -rn 's~([^/]+)/([0-9]+)\.svg~\2/\1.svg~p')
dst="${DST_BASE}/$dst_fn"
cp $src $dst
done
done
update-icon-caches /usr/share/icons/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment