title: Bash Zip Script
body: <p>I have written a script which (in theory) should zip all the contents of a folder (including subfolders and what not).</p>
  
  <p>However, when it's ran, it just includes one folder.</p>
  
  <p>Could you please help.</p>
  
  <p>Here is the script:</p>
  
  <pre><code>#!/bin/sh
  
  # pull the svn files
  cd /path/to/my/svn/folder
  svn update
  
  #Zip (tar gzip) up the folder
  zip -r updateZip trunk/*
  
  sleep 1
  
  
  USERNAME="******"
  PASSWORD="******"
  SERVER="127.0.0.1"
  
  # local directory to pickup zip file
  FILE="updateZip.zip"
  
  # remote server directory to upload backup
  BACKUPDIR="my/backup/dir/"
  
  # login to remote server
  ftp -n -i $SERVER &lt;&lt;EOF
  user $USERNAME $PASSWORD
  cd $BACKUPDIR
  mput $FILE
  quit
  EOF
  </code></pre>