-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·64 lines (57 loc) · 2.37 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
#
# brot - a minimal blogging engine based on tools you already have
# Copyright (C) 2015 Jonathan Kuhse
#
# 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/>.
# your copy tool, maybe interesting, if repo is a remote server (?)
COPY="rsync -raq"
# load the configuration:
. ./config.def
echo '
brot Copyright (C) 2015 Jonathan Kuhse
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions;
'
echo "The blog repository will be created in $BAREREPOSITORY"
echo "The blog will deploy the website in $DEPLOYMENT_DIR"
echo "when pushing into the private branch it will deploy instead to $DEPLOYMENT_DIR_PRIVATE"
echo "when pushing to the repository it will use a working directory: $WORKINGCOPY"
echo -n "continue? [ENTER]"
read answer
echo 'Now building the bare brot-system...'
git init --bare $BAREREPOSITORY
git init $WORKINGCOPY
# copy the initial file structure and git hooks/scripts
mkdir ./lib/struct/pages # TODO: only if doesnt exist
wget http://vollkorn-typeface.com/download/vollkorn-3-005.zip
unzip vollkorn-3-005.zip -d font
# mkdir $WORKINGCOPY/ref/font/
$COPY ./lib/struct/ $WORKINGCOPY/
$COPY font/WOFF/*.woff $WORKINGCOPY/ref/font/
rm -rf font vollkorn*
$COPY ./README.md $WORKINGCOPY/pages/$(date +%Y-%m-%d).readme.init_script.md
$COPY ./lib/hooks/post-receive $BAREREPOSITORY/hooks/
$COPY ./lib/backwaren $BAREREPOSITORY
$COPY ./config.def $BAREREPOSITORY/backwaren/environment
# create branches and make the first commit
cd $WORKINGCOPY
git remote add origin $BAREREPOSITORY
git symbolic-ref HEAD refs/heads/public
git add *
git commit -am "initial structure"
git push origin public
# git checkout -b "private"
# git push origin private