Created
February 18, 2014 17:44
-
-
Save kuatsure/9075871 to your computer and use it in GitHub Desktop.
This file contains 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
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "8000" |
This file contains 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
if [ ! -d site ]; then | |
# download .zip file | |
wget https://github.com/daytoncleancoders/projects/raw/master/commandline/command-line-kata.zip | |
# extraction ( all .zips, not just the above in pwd ) | |
tar -xf *.zip | |
# cd into project directory | |
cd site | |
# begin move | |
mkdir img | |
find . -name \*.jpg -print -exec mv {} img/ \; | |
find . -name \*.png -print -exec mv {} img/ \; | |
mkdir css | |
find . -name \*.css -print -exec mv {} css/ \; | |
mkdir js | |
find . -name \*.js -print -exec mv {} js/ \; | |
mkdir fonts | |
find . -name \*.woff -print -exec mv {} fonts/ \; | |
fi | |
# start httpserver | |
if [ -d site ]; then | |
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "8000" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment