Skip to content

Instantly share code, notes, and snippets.

@gustawho
Last active September 13, 2016 03:30
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 gustawho/8439c573329371b7c0fd79d2ed13742f to your computer and use it in GitHub Desktop.
Save gustawho/8439c573329371b7c0fd79d2ed13742f to your computer and use it in GitHub Desktop.
#!/bin/sh
cd /tmp
if [ -f /usr/bin/apt ]; then
sudo apt -y install build-essential git
fi
if [ -d /tmp/img2xterm ]; then
rm -rf img2xterm
fi
git clone https://github.com/rossy/img2xterm
cd img2xterm
make
cd /tmp
curl -O http://veekun.com/static/pokedex/downloads/pokemon-icons.tar.gz
tar xzf pokemon-icons.tar.gz
cd pokemon/icons
for f in *.png; do ../../img2xterm/img2xterm "$f" > "${f%%.*}.pokemon"; done
if [ -d $HOME/.pokemon ]; then
rm -rf $HOME/.pokemon
mkdir $HOME/.pokemon
else
mkdir $HOME/.pokemon
fi
mv *.pokemon $HOME/.pokemon
printf "
pokemon() {
cat $HOME/.pokemon/$(($RANDOM % 719 + 1))${*}.pokemon
}
pokemon
" >> $HOME/.bashrc
rm -rf /tmp/pokemon
rm -rf /tmp/img2xterm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment