cabin

Source code for personal website
git clone git://git.dimitrijedobrota.com/cabin.git
Log | Files | Refs

cabin-deploy.sh (729B)


      1 #!/bin/bash
      2 
      3 # cabin-deploy.sh: generate blog files and deploy to server
      4 
      5 if [ "$#" -ne 2 ]; then
      6         echo "Error: Invalid number of arguments"
      7         echo "Usage: $0 source destination"
      8         exit 1
      9 fi
     10 
     11 src="$1"
     12 dst="$2"
     13 
     14 pushd "$src" || exit
     15 find . -not -iname "*.md" -a -not -path "*.git*" -a -not -path "*.git*"| cpio -pvd "$dst"
     16 popd || exit
     17 
     18 opt=()
     19 opt+=(--author "Dimitrije Dobrota")
     20 opt+=(--base "https://dimitrijedobrota.com")
     21 opt+=(--email "mail@dimitrijedobrota.com")
     22 opt+=(--desc "Contents of Dimitrije Dobrota's blog")
     23 opt+=(--summary "Click on the article link to read...")
     24 
     25 stamd "${opt[@]}" --output "$dst/blog" --index $src/blog/*.md
     26 stamd --output "$dst" $src/*.md
     27 
     28 rsync -a $dst/* server:/var/www/cabin