cabinSource code for personal website | 
          
| git clone git://git.dimitrijedobrota.com/cabin.git | 
| Log | Files | Refs | README | LICENSE | 
| commit | 2a46f24d5db8f4c8178f819916e4c11eb38089f8 | 
| parent | faeee32b8d35d57cfff7d597425b312e81d9010a | 
| author | Dimitrije Dobrota < mail@dimitrijedobrota.com > | 
| date | Sat, 4 Jan 2025 19:49:44 +0100 | 
Add comments to deploy script
| M | cabin-deploy.sh | | | +++++++++++++ -- | 
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ cabin-deploy.sh b/ cabin-deploy.sh
@@ -2,6 +2,10 @@
# cabin-deploy.sh: generate blog files and deploy to server
          # Take contents of the source and copy it to destination
          # Turn markdown into html in the process and create indexes
          # At the end send everything to the server
          if [ "$#" -ne 2 ]; then
                  echo "Error: Invalid number of arguments"
                  echo "Usage: $0 source destination"
        
        
          @@ -11,8 +15,10 @@ 
          fi
        
        
          src="$(realpath $1)"
          dst="$(realpath $2)"
          # copy all of the files from source to desination
          # excluding md files and .git subdirectory
          pushd "$src" || exit
          find . -not -iname "*.md" -a -not -path "*.git*" -a -not -path "*.git*" | cpio -pd "$dst" 2>/dev/null
          find . -not -iname "*.md" -a -not -path "*.git*" | cpio -pd "$dst" 2>/dev/null
          popd || exit
          opt=()
        
        
          @@ -22,7 +28,12 @@ 
          imitrijedobrota.com")
        
        
          opt+=(--desc "Contents of Dimitrije Dobrota's blog")
          opt+=(--summary "Click on the article link to read...")
          # Convert all the md files to articles
          # Create all the indexes
          stamd "${opt[@]}" --output "$dst/blog" --index $src/blog/*.md
          stamd --output "$dst" $src/*.md
          # Create a home page
          stamd "${opt[@]}" --output "$dst" $src/*.md
          # Copy everything to the server
          rsync -a $dst/* server:/var/www/cabin