From 4384a35b0449b7698a3fa30be91c58dcdb7c5c26 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 11 Oct 2011 22:06:52 +0200 Subject: [PATCH 1/7] Update build for cron --- build-scripts/daily_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-scripts/daily_build.sh b/build-scripts/daily_build.sh index 679b804070..34fc9c3ba1 100755 --- a/build-scripts/daily_build.sh +++ b/build-scripts/daily_build.sh @@ -11,6 +11,7 @@ mkdir -p $LOG_DIR echo > $LOG_FILE touch $CLOG_FILE +cd "{$DIRECTORY}" git pull --rebase 2>&1 >>$LOG_FILE # 1. Update git directory From a3dc5a745502183a450ef3b83a8c9e9e0a052253 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 11 Oct 2011 22:14:55 +0200 Subject: [PATCH 2/7] Fix cd --- build-scripts/daily_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/daily_build.sh b/build-scripts/daily_build.sh index 34fc9c3ba1..a28836c483 100755 --- a/build-scripts/daily_build.sh +++ b/build-scripts/daily_build.sh @@ -11,7 +11,7 @@ mkdir -p $LOG_DIR echo > $LOG_FILE touch $CLOG_FILE -cd "{$DIRECTORY}" +cd "${DIRECTORY}" git pull --rebase 2>&1 >>$LOG_FILE # 1. Update git directory From ad608d5a737b6ab3f964cd5265ffdc7681240496 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 11 Oct 2011 22:17:46 +0200 Subject: [PATCH 3/7] Fix build /unexpected exit --- build-scripts/daily_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/daily_build.sh b/build-scripts/daily_build.sh index a28836c483..02eae384e2 100755 --- a/build-scripts/daily_build.sh +++ b/build-scripts/daily_build.sh @@ -21,7 +21,7 @@ git pull --rebase 2>&1 >>$LOG_FILE "${DIRECTORY}/build_branches.sh" >>$LOG_FILE 2>&1 # exit if nothing was changed if [ $? == 0 ]; then - exit + exit 0 fi # 3. upload to ftp server From 6774acfadb62e031d1c5b90b926484a86a637dd7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 11 Oct 2011 22:20:09 +0200 Subject: [PATCH 4/7] Verify build --- build-scripts/daily_build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-scripts/daily_build.sh b/build-scripts/daily_build.sh index 02eae384e2..068a67ee37 100755 --- a/build-scripts/daily_build.sh +++ b/build-scripts/daily_build.sh @@ -19,10 +19,11 @@ git pull --rebase 2>&1 >>$LOG_FILE # 2. Go through branches and generates builds "${DIRECTORY}/build_branches.sh" >>$LOG_FILE 2>&1 + # exit if nothing was changed -if [ $? == 0 ]; then + if [ $? == 0 ]; then exit 0 -fi + fi # 3. upload to ftp server #"${DIRECTORY}/upload_ftp.sh" 2>&1 >>$LOG_FILE From 84ed4bdc30866dccfca14bee09e461482ee10801 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 11 Oct 2011 22:28:05 +0200 Subject: [PATCH 5/7] Fix mails --- build-scripts/daily_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/daily_build.sh b/build-scripts/daily_build.sh index 068a67ee37..75e25f6231 100755 --- a/build-scripts/daily_build.sh +++ b/build-scripts/daily_build.sh @@ -21,7 +21,7 @@ git pull --rebase 2>&1 >>$LOG_FILE "${DIRECTORY}/build_branches.sh" >>$LOG_FILE 2>&1 # exit if nothing was changed - if [ $? == 0 ]; then + if [ $? = 0 ]; then exit 0 fi From 470ee5b29ad5be9c5ebccb55ca55b49ae8d005bd Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 11 Oct 2011 23:03:56 +0200 Subject: [PATCH 6/7] Update night build --- build-scripts/daily_build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-scripts/daily_build.sh b/build-scripts/daily_build.sh index 75e25f6231..8b2bb1e3bc 100755 --- a/build-scripts/daily_build.sh +++ b/build-scripts/daily_build.sh @@ -12,7 +12,7 @@ echo > $LOG_FILE touch $CLOG_FILE cd "${DIRECTORY}" -git pull --rebase 2>&1 >>$LOG_FILE +git pull --rebase >>$LOG_FILE 2>&1 # 1. Update git directory "${DIRECTORY}/update_git.sh" >>$LOG_FILE 2>&1 @@ -21,9 +21,9 @@ git pull --rebase 2>&1 >>$LOG_FILE "${DIRECTORY}/build_branches.sh" >>$LOG_FILE 2>&1 # exit if nothing was changed - if [ $? = 0 ]; then - exit 0 - fi +# if [ $? = 0 ]; then +# exit 0 +# fi # 3. upload to ftp server #"${DIRECTORY}/upload_ftp.sh" 2>&1 >>$LOG_FILE From 234e9091763ca2ae6bf7229247125876c248255c Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Tue, 11 Oct 2011 23:43:55 +0200 Subject: [PATCH 7/7] fixed saving of gpx tracks (my stupid mistake...) --- .../src/net/osmand/plus/activities/SavingTrackHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java index 02b63cbd36..5a4a9d9c47 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java @@ -136,15 +136,15 @@ public class SavingTrackHelper extends SQLiteOpenHelper { collectDBTracks(db, data); // save file - for (String f : data.keySet()) { + for (final String f : data.keySet()) { File fout = new File(dir, f + ".gpx"); //$NON-NLS-1$ if (fout.exists() && !data.get(f).isEmpty()) { - f = f + "_" + new SimpleDateFormat("HH-mm.EEEE").format(new Date(data.get(f).findPointToShow().time)); //$NON-NLS-1$ - fout = new File(dir, f + ".gpx"); //$NON-NLS-1$ + String fileName = f + "_" + new SimpleDateFormat("HH-mm-ss_EEEE").format(new Date(data.get(f).findPointToShow().time)); //$NON-NLS-1$ + fout = new File(dir, fileName + ".gpx"); //$NON-NLS-1$ int ind = 1; while (fout.exists()) { - fout = new File(dir, f + "_" + (++ind) + ".gpx"); //$NON-NLS-1$ //$NON-NLS-2$ + fout = new File(dir, fileName + "_" + (++ind) + ".gpx"); //$NON-NLS-1$ //$NON-NLS-2$ } }