[Roxygen-commits] r172 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 12 11:46:53 CEST 2008


Author: pcd
Date: 2008-08-12 11:46:53 +0200 (Tue, 12 Aug 2008)
New Revision: 172

Modified:
   pkg/src/roxygen
Log:
not sure if windows-worthy: but device/inode comparison instead of string comparison


Modified: pkg/src/roxygen
===================================================================
--- pkg/src/roxygen	2008-08-12 09:18:41 UTC (rev 171)
+++ pkg/src/roxygen	2008-08-12 09:46:53 UTC (rev 172)
@@ -58,8 +58,7 @@
     echo ${BASENAME}: "WARNING!" ${1} >&2
 }
 
-# Can't use `readlink -f' because it doesn't ship with Rtools
-source="'${1}'"
+source="${1}"
 
 if test ${#} -eq 1
 then target="NULL"
@@ -68,7 +67,7 @@
     then warning "Both -d (Destructive) and TARGET specified; using TARGET."
         destructive="FALSE"
     fi
-    target="'${2}'"
+    target="${2}"
 fi
 
 if test "${destructive}" = "TRUE"
@@ -80,7 +79,7 @@
     target="${source}"
 fi
 
-if test "${source}" = "${target}" -o "${destructive}" = "TRUE"
+if test "${source}" -ef "${target}" -o "${destructive}" = "TRUE"
 then
     if test "${unlink}" = "TRUE"
     then warning "SOURCE and TARGET are identical; unsetting -u (Unlink)."
@@ -89,6 +88,11 @@
     copy="FALSE"
 fi
 
+source="'${source}'"
+if "${target}" != "NULL"
+then target="'${target}'"
+fi
+
 : ${unlink:="FALSE"}
 : ${copy:="TRUE"}
 
@@ -96,6 +100,9 @@
     echo source: "${source}"\; target: "${target}"\; copy: "${copy}"\; unlink: "${unlink}"
 }
 
+debug
+exit 0
+
 R_EXE="${R_HOME}/bin/R"
 echo "library(roxygen)
       roxygenize(package.dir=${source},



More information about the Roxygen-commits mailing list