Skip to content

Instantly share code, notes, and snippets.

@th3fallen th3fallen/update.sh
Last active Jun 29, 2016

Embed
What would you like to do?
Mac safe bash script to update font-awesome from 3.2.1 to 4.*
#!/bin/bash
old=(
'adjust'
'adn'
'align-center'
'align-justify'
'align-left'
'align-right'
'ambulance'
'anchor'
'android'
'angle-down'
'angle-left'
'angle-right'
'angle-up'
'apple'
'archive'
'arrow-down'
'arrow-left'
'arrow-right'
'arrow-up'
'asterisk'
'backward'
'ban-circle'
'bar-chart'
'barcode'
'beaker'
'beer'
'bell-alt'
'bell'
'bitbucket-sign'
'bitbucket'
'bitcoin'
'bold'
'bolt'
'book'
'bookmark-empty'
'bookmark'
'briefcase'
'btc'
'bug'
'building'
'bullhorn'
'bullseye'
'calendar-empty'
'calendar'
'camera-retro'
'camera'
'caret-down'
'caret-left'
'caret-right'
'caret-up'
'certificate'
'check-empty'
'check-minus'
'check-sign'
'check'
'chevron-down'
'chevron-left'
'chevron-right'
'chevron-sign-down'
'chevron-sign-left'
'chevron-sign-right'
'chevron-sign-up'
'chevron-up'
'circle-arrow-down'
'circle-arrow-left'
'circle-arrow-right'
'circle-arrow-up'
'circle-blank'
'circle'
'cloud-download'
'cloud-upload'
'cloud'
'cny'
'code-fork'
'code'
'coffee'
'cog'
'cogs'
'collapse-alt'
'collapse-top'
'collapse'
'columns'
'comment-alt'
'comment'
'comments-alt'
'comments'
'compass'
'copy'
'credit-card'
'crop'
'css3'
'cut'
'dashboard'
'desktop'
'dollar'
'double-angle-down'
'double-angle-left'
'double-angle-right'
'double-angle-up'
'download-alt'
'download'
'dribbble'
'dropbox'
'edit-sign'
'edit'
'eject'
'ellipsis-horizontal'
'ellipsis-vertical'
'envelope-alt'
'envelope'
'eraser'
'eur'
'euro'
'exchange'
'exclamation-sign'
'exclamation'
'expand-alt'
'expand'
'external-link-sign'
'external-link'
'eye-close'
'eye-open'
'facebook-sign'
'facebook'
'facetime-video'
'fast-backward'
'fast-forward'
'female'
'fighter-jet'
'file-alt'
'file-text-alt'
'file-text'
'file'
'film'
'filter'
'fire-extinguisher'
'fire'
'fixed-width'
'fixed-width'
'flag-alt'
'flag-checkered'
'flag'
'flickr'
'folder-close-alt'
'folder-close'
'folder-open-alt'
'folder-open'
'font'
'food'
'forward'
'foursquare'
'frown'
'fullscreen'
'gamepad'
'gbp'
'gear'
'gears'
'gift'
'github-alt'
'github-sign'
'github'
'gittip'
'glass'
'globe'
'google-plus-sign'
'google-plus'
'group'
'h-sign'
'hand-down'
'hand-left'
'hand-right'
'hand-up'
'hdd'
'headphones'
'heart-empty'
'heart'
'home'
'hospital'
'html5'
'inbox'
'indent-left'
'indent-right'
'info-sign'
'info'
'inr'
'instagram'
'italic'
'jpy'
'key'
'keyboard'
'krw'
'laptop'
'large'
'large'
'leaf'
'legal'
'lemon'
'level-down'
'level-up'
'li'
'lightbulb'
'link'
'linkedin-sign'
'linkedin'
'linux'
'list-alt'
'list-ol'
'list-ul'
'list'
'location-arrow'
'lock'
'long-arrow-down'
'long-arrow-left'
'long-arrow-right'
'long-arrow-up'
'magic'
'magnet'
'mail-forward'
'mail-reply-all'
'mail-reply'
'male'
'map-marker'
'maxcdn'
'medkit'
'meh'
'microphone-off'
'microphone'
'minus-sign-alt'
'minus-sign'
'minus'
'mobile-phone'
'money'
'moon'
'move'
'music'
'off'
'ok-circle'
'ok-sign'
'ok'
'paper-clip'
'paperclip'
'paste'
'pause'
'pencil'
'phone-sign'
'phone'
'picture'
'pinterest-sign'
'pinterest'
'plane'
'play-circle'
'play-sign'
'play'
'plus-sign-alt'
'plus-sign'
'plus'
'power-off'
'print'
'pushpin'
'puzzle-piece'
'qrcode'
'question-sign'
'question'
'quote-left'
'quote-right'
'random'
'refresh'
'remove-circle'
'remove-sign'
'remove'
'renminbi'
'renren'
'reorder'
'repeat'
'reply-all'
'reply'
'resize-full'
'resize-horizontal'
'resize-small'
'resize-vertical'
'retweet'
'road'
'rocket'
'rotate-left'
'rotate-right'
'rss-sign'
'rss'
'rupee'
'save'
'screenshot'
'search'
'share-alt'
'share-sign'
'share'
'shield'
'shopping-cart'
'sign-blank'
'signal'
'signin'
'signout'
'sitemap'
'skype'
'smile'
'sort-by-alphabet-alt'
'sort-by-alphabet'
'sort-by-attributes-alt'
'sort-by-attributes'
'sort-by-order-alt'
'sort-by-order'
'sort-down'
'sort-down'
'sort-up'
'sort-up'
'sort'
'spin'
'spinner'
'stackexchange'
'star-empty'
'star-half-empty'
'star-half-full'
'star-half'
'star'
'step-backward'
'step-forward'
'stethoscope'
'stop'
'strikethrough'
'subscript'
'suitcase'
'sun'
'superscript'
'table'
'tablet'
'tag'
'tags'
'tasks'
'terminal'
'text-height'
'text-width'
'th-large'
'th-list'
'th'
'thumbs-down-alt'
'thumbs-down'
'thumbs-up-alt'
'thumbs-up'
'ticket'
'time'
'tint'
'trash'
'trello'
'trophy'
'truck'
'tumblr-sign'
'tumblr'
'twitter-sign'
'twitter'
'umbrella'
'unchecked'
'underline'
'undo'
'unlink'
'unlock-alt'
'unlock'
'upload-alt'
'upload'
'usd'
'user-md'
'user'
'vk'
'volume-down'
'volume-off'
'volume-up'
'warning-sign'
'weibo'
'windows'
'won'
'wrench'
'xing-sign'
'xing'
'yen'
'youtube-play'
'youtube-sign'
'youtube'
'zoom-in'
'zoom-out'
)
new=(
'adjust'
'adn'
'align-center'
'align-justify'
'align-left'
'align-right'
'ambulance'
'anchor'
'android'
'angle-down'
'angle-left'
'angle-right'
'angle-up'
'apple'
'archive'
'arrow-down'
'arrow-left'
'arrow-right'
'arrow-up'
'asterisk'
'backward'
'ban'
'bar-chart-o'
'barcode'
'flask'
'beer'
'bell'
'bell-o'
'bitbucket-square'
'bitbucket'
'bitcoin'
'bold'
'bolt'
'book'
'bookmark-o'
'bookmark'
'briefcase'
'btc'
'bug'
'building-o'
'bullhorn'
'bullseye'
'calendar-o'
'calendar'
'camera-retro'
'camera'
'caret-down'
'caret-left'
'caret-right'
'caret-up'
'certificate'
'square-o'
'minus-square-o'
'check-square'
'check-square-o'
'chevron-down'
'chevron-left'
'chevron-right'
'chevron-circle-down'
'chevron-circle-left'
'chevron-circle-right'
'chevron-circle-up'
'chevron-up'
'arrow-circle-down'
'arrow-circle-left'
'arrow-circle-right'
'arrow-circle-up'
'circle-o'
'circle'
'cloud-download'
'cloud-upload'
'cloud'
'rub'
'code-fork'
'code'
'coffee'
'cog'
'cogs'
'minus-square-o'
'caret-square-o-up'
'caret-square-o-down'
'columns'
'comment-o'
'comment'
'comments-o'
'comments'
'compass'
'files-o'
'credit-card'
'crop'
'css3'
'scissors'
'tachometer'
'desktop'
'dollar'
'angle-double-down'
'angle-double-left'
'angle-double-right'
'angle-double-up'
'download'
'arrow-circle-o-down'
'dribbble'
'dropbox'
'pencil-square'
'pencil-square-o'
'eject'
'ellipsis-h'
'ellipsis-v'
'envelope-o'
'envelope'
'eraser'
'eur'
'euro'
'exchange'
'exclamation-circle'
'exclamation'
'plus-square-o'
'caret-square-o-right'
'external-link-square'
'external-link'
'eye-slash'
'eye'
'facebook-square'
'facebook'
'video-camera'
'fast-backward'
'fast-forward'
'female'
'fighter-jet'
'file-o'
'file-text-o'
'file-text'
'file'
'film'
'filter'
'fire-extinguisher'
'fire'
'fixed-width'
'fw'
'flag-o'
'flag-checkered'
'flag'
'flickr'
'folder-o'
'folder'
'folder-open-o'
'folder-open'
'font'
'cutlery'
'forward'
'foursquare'
'frown-o'
'arrows-alt'
'gamepad'
'gbp'
'gear'
'gears'
'gift'
'github-alt'
'github-square'
'github'
'gittip'
'glass'
'globe'
'google-plus-square'
'google-plus'
'users'
'h-square'
'hand-o-down'
'hand-o-left'
'hand-o-right'
'hand-o-up'
'hdd-o'
'headphones'
'heart-o'
'heart'
'home'
'hospital-o'
'html5'
'inbox'
'outdent'
'indent'
'info-circle'
'info'
'inr'
'instagram'
'italic'
'jpy'
'key'
'keyboard-o'
'krw'
'laptop'
'large'
'lg'
'leaf'
'gavel'
'lemon-o'
'level-down'
'level-up'
'li'
'lightbulb-o'
'link'
'linkedin-square'
'linkedin'
'linux'
'list-alt'
'list-ol'
'list-ul'
'list'
'location-arrow'
'lock'
'long-arrow-down'
'long-arrow-left'
'long-arrow-right'
'long-arrow-up'
'magic'
'magnet'
'mail-forward'
'mail-reply-all'
'mail-reply'
'male'
'map-marker'
'maxcdn'
'medkit'
'meh-o'
'microphone-slash'
'microphone'
'minus-square'
'minus-circle'
'minus'
'mobile'
'money'
'moon-o'
'arrows'
'music'
'power-off'
'check-circle-o'
'check-circle'
'check'
'paperclip'
'paperclip'
'clipboard'
'pause'
'pencil'
'phone-square'
'phone'
'picture-o'
'pinterest-square'
'pinterest'
'plane'
'play-circle-o'
'play-circle'
'play'
'plus-square'
'plus-circle'
'plus'
'power-off'
'print'
'thumb-tack'
'puzzle-piece'
'qrcode'
'question-circle'
'question'
'quote-left'
'quote-right'
'random'
'refresh'
'times-circle-o'
'times-circle'
'times'
'renminbi'
'renren'
'bars'
'repeat'
'reply-all'
'reply'
'expand'
'arrows-h'
'compress'
'arrows-v'
'retweet'
'road'
'rocket'
'rotate-left'
'rotate-right'
'rss-square'
'rss'
'rupee'
'floppy-o'
'crosshairs'
'search'
'share'
'share-square'
'share-square-o'
'shield'
'shopping-cart'
'square'
'signal'
'sign-in'
'sign-out'
'sitemap'
'skype'
'smile-o'
'sort-alpha-desc'
'sort-alpha-asc'
'sort-amount-desc'
'sort-amount-asc'
'sort-numeric-desc'
'sort-numeric-asc'
'sort-asc'
'sort-desc'
'sort-asc'
'sort-desc'
'sort'
'spin'
'spinner'
'stack-overflow'
'star-o'
'star-half-o'
'star-half-full'
'star-half'
'star'
'step-backward'
'step-forward'
'stethoscope'
'stop'
'strikethrough'
'subscript'
'suitcase'
'sun-o'
'superscript'
'table'
'tablet'
'tag'
'tags'
'tasks'
'terminal'
'text-height'
'text-width'
'th-large'
'th-list'
'th'
'thumbs-o-down'
'thumbs-down'
'thumbs-o-up'
'thumbs-up'
'ticket'
'clock-o'
'tint'
'trash-o'
'trello'
'trophy'
'truck'
'tumblr-square'
'tumblr'
'twitter-square'
'twitter'
'umbrella'
'unchecked'
'underline'
'undo'
'chain-broken'
'unlock-alt'
'unlock'
'upload'
'arrow-circle-o-up'
'usd'
'user-md'
'user'
'vk'
'volume-down'
'volume-off'
'volume-up'
'exclamation-triangle'
'weibo'
'windows'
'won'
'wrench'
'xing-square'
'xing'
'yen'
'youtube-play'
'youtube-square'
'youtube'
'search-plus'
'search-minus'
)
count=0
while [ "x${old[count]}" != "x" ]
do
echo "icon-${old[count]}/fa fa-${new[count]}"
find $1 \( -name "*.js" -o -name "*.mustache" -o -name "*.md" -o -name "*.html" \) -type f -print0 | xargs -0 sed -i '' -e "s/icon-${old[count]}/fa fa-${new[count]}/g"
count=$(( $count + 1 ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.