#!/bin/bash

# copies all messaging files to the device

REMOTE_PATH="file:///usr/palm/applications/com.palm.app.messaging/"
FILES="*"

handlesubdir () {
  echo "$1 directory."
  for f in $1/$FILES
  do
    if [ -d $f ]
    then
      handlesubdir $f
    else
      novacom put $REMOTE_PATH$f < $f
    fi
    #novacom put $REMOTE_PATH$f < $f
  done
}


echo "`pwd` directory."
for f in $FILES
do
  if [ -d $f ]
  then
    handlesubdir $f
  else
    novacom put $REMOTE_PATH$f < $f
  fi
done




