Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # HTML5 Barebones Template Generator Script
- # Developed by Ryan K. Clark
- # For more scripts, please visit http://www.tehnewdev.tumblr.com/
- # Version 1.0
- clear
- echo "Type a name for your file."
- sleep 1
- read file
- if [[ -z $file ]]
- then
- echo "Error 0x001: Not a valid filename."
- exit
- elif [[ $file =~ \.html$ ]]
- then
- echo "Error 0x002: $file.html is invalid."
- exit
- else
- clear
- echo "Generating $file.html, please wait..."
- sleep 1
- fi
- echo "<!DOCTYPE html>" > $file.html
- echo -e "" >> $file.html
- echo "<html>" >> $file.html
- echo -e "\t<head>" >> $file.html
- echo -e "\t\t<meta name=\"author\" content=\"HTML5 Barebones Template Generator\" />" >> $file.html
- echo -e "\t\t<meta name=\"description\" content=\"HTML5 Barebones Template Generator\" />" >> $file.html
- echo -e "\t\t<meta name=\"keywords\" content=\"HTML5, Barebones, Template, Generator\" />" >> $file.html
- echo -e "\t\t<meta charset=\"UTF-8\" />" >> $file.html
- echo -e "\t\t<title>Untitled Document</title>" >> $file.html
- echo -e "\t</head>" >> $file.html
- echo -e "\t<body>" >> $file.html
- echo -e "\t\t<!-- Insert content here... -->" >> $file.html
- echo -e "\t</body>" >> $file.html
- echo -n "</html>" >> $file.html
- echo "Generation Completed! $file.html is located in: "; pwd
Advertisement
Add Comment
Please, Sign In to add comment