Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Jaka Kranjc (2f9f04b2038e80ed82923602b5097cf460e47cd6)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Jaka Kranjc (2f9f04b2038e80ed82923602b5097cf460e47cd6)
  • Date: Sat, 9 Jun 2007 15:16:59 -0500

GIT changes to master grimoire by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

php-pear/php-dev/DETAILS | 2 ++
php-pear/php-dev/HISTORY | 4 ++++
php-pear/php-dev/getSnapshotTime | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 40 insertions(+)

New commits:
commit 21bb4e1cf1ea18daff2f13380aa8706b09ec495f
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

php-dev: defeat the octal boss to add fundations for a snapshots

diff --git a/php-pear/php-dev/DETAILS b/php-pear/php-dev/DETAILS
index 8f9396e..f05413a 100755
--- a/php-pear/php-dev/DETAILS
+++ b/php-pear/php-dev/DETAILS
@@ -1,3 +1,5 @@
+. $SPELL_DIRECTORY/getSnapshotTime
+#VERSION=bla-$(getSnapshotTime)-bla
SPELL=php-dev
VERSION=5.0
TAG=HEAD
diff --git a/php-pear/php-dev/HISTORY b/php-pear/php-dev/HISTORY
index 1205e05..aa1663c 100644
--- a/php-pear/php-dev/HISTORY
+++ b/php-pear/php-dev/HISTORY
@@ -1,3 +1,7 @@
+2007-06-09 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * getSnapshotTime: added to get funny source names
+ * DETAILS: a commented example of use
+
2007-03-24 Jeremy Blosser <jblosser-smgl AT firinn.org>
* DEPENDS: Add icu, bug 11308.

diff --git a/php-pear/php-dev/getSnapshotTime
b/php-pear/php-dev/getSnapshotTime
new file mode 100644
index 0000000..ba077b6
--- /dev/null
+++ b/php-pear/php-dev/getSnapshotTime
@@ -0,0 +1,34 @@
+# php builds snapshots from cvs every two hours on the even half hour
+# 0830, 1030, 1230 ... and makes that part of the name of the filename
+function getSnapshotTime() {
+ local hour=$(date -u +%H)
+ local minutes=$(date -u +%M)
+
+ dec_hour() {
+ hour=${hour#0}
+ ((hour--))
+ if [[ ${#hour} == 1 ]]; then
+ hour=0$hour
+ fi
+ }
+
+ if [[ $hour == 00 ]] && (( $minutes < 30)); then
+ hour=23
+ fi
+
+ # wierd return codes, yes
+ if (( ${hour#0} % 2 )); then
+ # odd hour
+ dec_hour
+ else
+ # even hour
+ if (( $minutes < 30 )); then
+ dec_hour; dec_hour
+ fi
+ fi
+ echo ${hour}30
+}
+
+# for a good test try the following; first change the header to take
arguments
+#for i in 00 01 09 10 23; do for j in 05 29 30 31; do
+#getSnapshotTime $i $j; echo --------; done; done



  • [SM-Commit] GIT changes to master grimoire by Jaka Kranjc (2f9f04b2038e80ed82923602b5097cf460e47cd6), Jaka Kranjc, 06/09/2007

Archive powered by MHonArc 2.6.24.

Top of Page