From 1bbb5107565d657f8101eed3faa262939a816c7b Mon Sep 17 00:00:00 2001
From: Brad Anderson A practical guide to the Rust crate ecosystem. If you'd like to make changes to the project, please see this guide. MIT/Apache-2.0Contributing
-
- Cookin' with Rust
-Recipes
-Byteorder []byteorder
-File IO []file
-Command Line Parsing []clap
-JSON []json
-Contributing
-License
-
?
operator work
-
-
diff --git a/book/pages/file_io.html b/book/pages/file_io.html
index d50d2d6..e11a2a1 100644
--- a/book/pages/file_io.html
+++ b/book/pages/file_io.html
@@ -109,20 +109,6 @@
-
-
diff --git a/book/pages/json.html b/book/pages/json.html
index 7b34c22..ab4eb7a 100644
--- a/book/pages/json.html
+++ b/book/pages/json.html
@@ -148,20 +148,6 @@ fn main(){
-
-
diff --git a/book/pages/math.html b/book/pages/math.html
index 2fd377a..c233fbf 100644
--- a/book/pages/math.html
+++ b/book/pages/math.html
@@ -110,20 +110,6 @@
-
-
diff --git a/book/pages/rand.html b/book/pages/rand.html
index 00b472c..29dbedc 100644
--- a/book/pages/rand.html
+++ b/book/pages/rand.html
@@ -210,20 +210,6 @@ fn main() {
-
-
diff --git a/book/pages/serialization.html b/book/pages/serialization.html
index fbf836d..fd39592 100644
--- a/book/pages/serialization.html
+++ b/book/pages/serialization.html
@@ -109,20 +109,6 @@
-
-
diff --git a/book/pages/table_of_contents.html b/book/pages/table_of_contents.html
index d6fb25e..e89665d 100644
--- a/book/pages/table_of_contents.html
+++ b/book/pages/table_of_contents.html
@@ -117,20 +117,6 @@
-
-
diff --git a/book/pages/toml.html b/book/pages/toml.html
index 79ad9ac..38c6d0c 100644
--- a/book/pages/toml.html
+++ b/book/pages/toml.html
@@ -176,20 +176,6 @@ fn main() {
-
-
diff --git a/book/print.html b/book/print.html
index 22b15b9..39ce22e 100644
--- a/book/print.html
+++ b/book/print.html
@@ -440,20 +440,6 @@ TODO: Maybe provide a template?
-
-
diff --git a/build-site.sh b/build-site.sh
new file mode 100755
index 0000000..69cd988
--- /dev/null
+++ b/build-site.sh
@@ -0,0 +1,30 @@
+# Returns 1 if program is installed and 0 otherwise
+function program_installed {
+ local return_=1
+
+ type $1 >/dev/null 2>&1 || { local return_=0; }
+
+ echo "$return_"
+}
+
+function main() {
+ # Ensure required programs are installed
+ if [ $(program_installed git) == 0 ]; then
+ echo "Please install Git."
+ elif [ $(program_installed ghp-import) == 0 ]; then
+ echo "Please install ghp-import: pip install ghp-import."
+ elif [ $(program_installed mdbook) == 0 ]; then
+ echo "Please install mdbook: cargo install mdbook."
+ else
+ echo "Copying CONTRIBUTING.md to src/pages/contributing.md"
+ cp CONTRIBUTING.md src/pages/contributing.md
+ echo "Building site to book/"
+ mdbook build
+ echo "Committing book directory to gh-pages branch"
+ ghp-import -p book
+ # echo ""
+ # echo "To push changes to site, run ghp-import -p book"
+ fi
+}
+
+main