File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed
Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 1- NEWS: MOBILE-SYNC 29.02 .2012
1+ NEWS: MOBILE-SYNC 21.07 .2012
22===============================================================================
33
4+ # 2.3 (21. July 2012)
5+ Enhancements:
6+ - prints the current date and time using date function into a timestamp file.
7+
48# 2.2 (16. April 2012)
59Bugfixes:
610 - compress() function now compresses the archive based on file ending;
Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ host="mercury"
2626# logfile (optional, default=sync.log)
2727# logfile="sync.log"
2828
29+ # timefile (optional, default=sync.time)
30+ # timefile="sync.time"
31+
2932# Include dependancy, which will parse arguments and do some checking.
30- . synclib.sh
33+ . ./ synclib.sh
3134
3235# #########################################################################
3336# SYNC FUNCTIONS AVAILABLE
@@ -51,6 +54,9 @@ host="mercury"
5154#
5255# #########################################################################
5356
57+ # Remove this line when you are done
58+ exit 1
59+
5460# Start Sync
5561info " Starting sync from ` host $host ` ..."
5662message " Timeout is set to $timeout ."
Original file line number Diff line number Diff line change 11# synclib.sh
22
3- # Version 2.2 (16. April 2012)
3+ # Version 2.3 (21. July 2012)
44# Copyright (c) 2010-2012, Ben Morgan <neembi@googlemail.com>
55#
66# Permission to use, copy, modify, and/or distribute this software for any
1515# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1616# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1717
18- _version=" 2.2 "
18+ _version=" 2.3 "
1919
2020# Set the colors for the terminal
2121cBOLD=" \e[1m"
@@ -127,7 +127,8 @@ function synch() {
127127 fi
128128}
129129
130- # Use rsync to interactively keep destination synchronized
130+ # Use rsync to interactively keep destination synchronized.
131+ # I personally do not like this function; it feels 'dirty'.
131132function isynch() {
132133 output=$1 # output location to sync to
133134 input=$2 # input directory
204205if [[ -z $logfile ]]; then
205206 logfile=" $startdir /sync.log"
206207fi
208+ if [[ -z $timefile ]]; then
209+ timefile=" $startdir /sync.time"
210+ fi
207211
208212# Parse arguments
209213while [ $# -gt 0 ]; do
@@ -237,4 +241,5 @@ while [ $# -gt 0 ]; do
237241 esac
238242done
239243
244+ date > $timefile
240245printf " \n\n$( date) :: synclib version $_version =====\n" >> $logfile
You can’t perform that action at this time.
0 commit comments