Skip to content

Commit

Permalink
Version 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Morgan committed Jul 21, 2012
1 parent 47a109e commit 2d09de4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
6 changes: 5 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
NEWS: MOBILE-SYNC 29.02.2012
NEWS: MOBILE-SYNC 21.07.2012
===============================================================================

# 2.3 (21. July 2012)
Enhancements:
- prints the current date and time using date function into a timestamp file.

# 2.2 (16. April 2012)
Bugfixes:
- compress() function now compresses the archive based on file ending;
Expand Down
8 changes: 7 additions & 1 deletion sync-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ host="mercury"
# logfile (optional, default=sync.log)
#logfile="sync.log"

# timefile (optional, default=sync.time)
#timefile="sync.time"

# Include dependancy, which will parse arguments and do some checking.
. synclib.sh
. ./synclib.sh

##########################################################################
# SYNC FUNCTIONS AVAILABLE
Expand All @@ -51,6 +54,9 @@ host="mercury"
#
##########################################################################

# Remove this line when you are done
exit 1

# Start Sync
info "Starting sync from `host $host`..."
message "Timeout is set to $timeout."
Expand Down
11 changes: 8 additions & 3 deletions synclib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# synclib.sh

# Version 2.2 (16. April 2012)
# Version 2.3 (21. July 2012)
# Copyright (c) 2010-2012, Ben Morgan <[email protected]>
#
# Permission to use, copy, modify, and/or distribute this software for any
Expand All @@ -15,7 +15,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

_version="2.2"
_version="2.3"

# Set the colors for the terminal
cBOLD="\e[1m"
Expand Down Expand Up @@ -127,7 +127,8 @@ function synch() {
fi
}

# Use rsync to interactively keep destination synchronized
# Use rsync to interactively keep destination synchronized.
# I personally do not like this function; it feels 'dirty'.
function isynch() {
output=$1 # output location to sync to
input=$2 # input directory
Expand Down Expand Up @@ -204,6 +205,9 @@ fi
if [[ -z $logfile ]]; then
logfile="$startdir/sync.log"
fi
if [[ -z $timefile ]]; then
timefile="$startdir/sync.time"
fi

# Parse arguments
while [ $# -gt 0 ]; do
Expand Down Expand Up @@ -237,4 +241,5 @@ while [ $# -gt 0 ]; do
esac
done

date > $timefile
printf "\n\n$(date) :: synclib version $_version =====\n" >> $logfile

0 comments on commit 2d09de4

Please sign in to comment.