Last active
December 20, 2015 10:39
-
-
Save mateusreis/6117709 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
#!/bin/bash | |
# Updated: Wed Apr 10 21:04:12 2013 by webmaster@askapache | |
# @ http://uploads.askapache.com/2013/04/gnu-mirror-index-creator.txt | |
# Copyright (C) 2013 Free Software Foundation, Inc. | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
function html1 () | |
{ | |
local H="index.html" | |
touch $H && test -w $H || exit 2; | |
( | |
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'; | |
echo "<html><head><title></title></head>"; | |
echo "<body>"; | |
echo "</body></html>"; | |
) > $H; | |
# remove empty directories, they dont need to be there and slow things down if they are | |
find . -maxdepth 1 -type d -empty -exec rm -rf {} \; | |
# ===================================================================== | |
local CSSFILE="style.css" CSS="css" | |
[[ -d $CSS ]] || mkdir -p $CSS; | |
cd $CSS || exit 2; | |
touch $CSSFILE && test -w $CSSFILE || exit 2; | |
( | |
echo '.body{}'; | |
) > $CSSFILE; | |
# ===================================================================== | |
cd -; | |
local JSFILE="scripts.js" JS="js" | |
[[ -d $JS ]] || mkdir -p $JS; | |
cd $JS || exit 2; | |
touch $JSFILE && test -w $JSFILE || exit 2; | |
( | |
echo '<!-- js -->'; | |
) > $JSFILE; | |
cd -; | |
local SASS="sass" | |
[[ -d $SASS ]] || mkdir -p $SASS; | |
local IMG="img" | |
[[ -d $IMG ]] || mkdir -p $IMG; | |
} | |
html1 | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment