]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/configure
start allowing for local user cache configuration
[cran2deb.git] / trunk / configure
index 106c58a9814f422c1d85d8c2884e6eb1176a136b..fa1a12aec7a961015396be81abcea4a1d99fc414 100755 (executable)
@@ -1,11 +1,19 @@
 #!/bin/sh
-# stamp the source with the originating git revision.
-git_rev=$(git show --pretty'=oneline' 'HEAD' | head -n1 | cut -f1 -d' ')
-#git_r='assign("git_revision","'$git_rev'",envir=.GlobalEnv)'
-git_r='    global("git_revision","'$git_rev'")'
-
-awk -v "git_r=$git_r" '
-/# git_revision }/ {suppress=0}
-suppress == 0 {print}
-/# git_revision {/ {print git_r; suppress=1}
-' <R/zzz.R.in >R/zzz.R
+#
+# We are tricking the builds process into executing this so that we can
+# extract an svn revision number from the source directory
+
+# do nothing if we are not in a svn repository
+if [ ! -d .svn ]; then
+    exit 
+fi
+
+svnrev=$(svnversion | cut -f1 -d:)
+
+cat <<EOF > R/svnversion.R
+# Autogenerated by configure. Do not edit.
+svnversion <- function() {
+  return("$svnrev")
+}
+EOF
+