Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bootstrap script, simplify fetch script, simplify installation in…
…structions
- Loading branch information
Showing
4 changed files
with
43 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Exit with nonzero exit code if anything fails | ||
|
||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
# Fetch books repositories | ||
echo | ||
echo "Fetching books repositories..." | ||
"$DIR/fetch-books.sh" | ||
|
||
# Build each project (it is needed to build the site) | ||
echo | ||
echo "Building projects..." | ||
cd books/react-book/project_source | ||
npm install | ||
node build_all.js | ||
cd - | ||
|
||
echo | ||
echo "Installing dependencies..." | ||
npm install | ||
|
||
echo | ||
echo "Done!" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,16 @@ | ||
#!/bin/bash | ||
set -e # Exit with nonzero exit code if anything fails | ||
|
||
mkdir -p books | ||
mkdir -p books/maintenance-book | ||
mkdir -p books/react-book | ||
mkdir -p books/webpack-book | ||
|
||
cd books/maintenance-book | ||
if [ -d ".git" ]; then git pull; | ||
else git clone -b master https://github.com/survivejs/maintenance-book.git .; | ||
fi | ||
#!/usr/bin/env bash | ||
|
||
cd - | ||
|
||
cd books/react-book | ||
if [ -d ".git" ]; then git pull; | ||
else git clone -b master https://github.com/survivejs/react-book.git .; | ||
fi | ||
set -e # Exit with nonzero exit code if anything fails | ||
|
||
cd - | ||
BOOKS=(maintenance-book react-book webpack-book) | ||
|
||
cd books/webpack-book | ||
if [ -d ".git" ]; then git pull; | ||
else git clone -b master https://github.com/survivejs/webpack-book.git .; | ||
fi | ||
# Clone or pull all books | ||
for s in ${BOOKS[*]}; do | ||
if [ -d "books/$s" ]; then | ||
cd "books/$s" | ||
git pull | ||
cd - | ||
else | ||
git clone -b master "https://github.com/survivejs/$s.git" "books/$s" | ||
fi | ||
done |