From 0535c77a73494bb71ded006ad7aadf31c8e78fad Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sat, 26 Nov 2011 23:02:09 -0800 Subject: [PATCH] add publishing scripts --- publish-blog.sh | 17 +++++++++++++++++ publish-samhuri.net.sh | 20 ++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 publish-blog.sh create mode 100755 publish-samhuri.net.sh diff --git a/publish-blog.sh b/publish-blog.sh new file mode 100755 index 0000000..fc07d10 --- /dev/null +++ b/publish-blog.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [[ -d ~/Projects/web/samhuri.net ]]; then + cd ~/Projects/web/samhuri.net +elif [[ -d ~/samhuri.net ]]; then + cd ~/samhuri.net +else + echo "error: samhuri.net directory not found" + exit 1 +fi + +cd _blog +git clean -fdq +git pull +cd .. + +make publish_blog diff --git a/publish-samhuri.net.sh b/publish-samhuri.net.sh new file mode 100755 index 0000000..2781ee0 --- /dev/null +++ b/publish-samhuri.net.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if [[ -d ~/Projects/web/samhuri.net ]]; then + cd ~/Projects/web/samhuri.net +elif [[ -d ~/samhuri.net ]]; then + cd ~/samhuri.net +else + echo "error: samhuri.net directory not found" + exit 1 +fi + +cd _blog +git clean -fdq +git pull +cd .. + +git clean -fdq +git pull + +make publish