Last active
December 14, 2015 16:58
-
-
Save enapupe/5118556 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage - $0 file-name" | |
| exit 1 | |
| fi | |
| if [ -f "$1.$2" ] | |
| then | |
| echo ".$1 {background-image:url('data:image/$2;base64,`cat $1.$2 | base64 -w 0 $1.$2 `')}" | xclip -selection clipboard | |
| else | |
| echo "Sorry, $1.$2 file does not exist" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment