mirror of https://github.com/dyne/webnomad.git
88 lines
2.5 KiB
Bash
Executable File
88 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env zsh
|
|
#
|
|
# Jaro Web, your slick and static website publisher
|
|
#
|
|
# Copyleft (C) 2012-2013 Denis Roio <jaromil@dyne.org>
|
|
#
|
|
# This source code is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This source code 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.
|
|
# Please refer to the GNU Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Public License along with
|
|
# this source code; if not, write to:
|
|
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
source jaroweb/utils
|
|
|
|
|
|
mkdir -p views
|
|
{ test -r views/index.html } || {
|
|
cat <<EOF > views/index.html
|
|
<h1>Hello world</h1>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
|
|
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
aliquip ex ea commodo consequat. Duis aute irure dolor in
|
|
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
|
|
EOF
|
|
}
|
|
|
|
mkdir -p tmpl
|
|
{ test -r tmpl/header.html } || {
|
|
cp -v jaroweb/tmpl/header.html tmpl }
|
|
|
|
{ test -r tmpl/footer.html } || {
|
|
cp -v jaroweb/tmpl/footer.html tmpl }
|
|
|
|
{ test -r tmpl/navbar.html } || {
|
|
cp -v jaroweb/tmpl/navbar.html tmpl }
|
|
|
|
{ test -r views/js/html5.js } || {
|
|
cp -v jaroweb/js/html5.js views/js }
|
|
|
|
{ test -r views/css/bootstrap.css } || {
|
|
cp -v jaroweb/js/bootstrap* views/js
|
|
cp -v jaroweb/css/bootstrap* views/css }
|
|
|
|
{ test -r views/css/blueimp-gallery.css } || {
|
|
cp -v jaroweb/js/*blueimp* views/js
|
|
cp -v jaroweb/css/*blueimp* views/css }
|
|
|
|
{ test -r views/css/strapdown.css } || {
|
|
cp -v jaroweb/js/strapdown.js views/js
|
|
cp -v jaroweb/css/strapdown.css views/css }
|
|
|
|
{ test -r config.zsh } || {
|
|
cat <<EOF > config.zsh
|
|
TITLE="A new website made with Jaro Web."
|
|
BRAND="Jaro Web"
|
|
DESCRIPTION="Jaro Web, your slick and static website publisher, powered by HTML5, Zsh and Bootstrap"
|
|
KEYWORDS="web, design, html"
|
|
EOF
|
|
}
|
|
|
|
{ test -r Makefile } || {
|
|
cat <<EOF > Makefile
|
|
all:
|
|
@./jaroweb/render
|
|
|
|
clean:
|
|
rm -rf pub
|
|
|
|
upload:
|
|
@scp -r pub/.htaccess pub/* online.server.org:/var/www
|
|
EOF
|
|
}
|
|
|
|
act "website initialized."
|