[Roxygen-commits] r171 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 12 11:18:41 CEST 2008


Author: pcd
Date: 2008-08-12 11:18:41 +0200 (Tue, 12 Aug 2008)
New Revision: 171

Modified:
   pkg/src/roxygen
Log:
a roxygen script that appears to work on linux and windows


Modified: pkg/src/roxygen
===================================================================
--- pkg/src/roxygen	2008-08-12 01:58:38 UTC (rev 170)
+++ pkg/src/roxygen	2008-08-12 09:18:41 UTC (rev 171)
@@ -1,6 +1,5 @@
 #!/bin/sh
-declare -r DESTRUCTIVE="FALSE"
-declare -r BASENAME="$(basename $0)"
+BASENAME="$(basename $0)"
 
 version="Roxygen 0.1"
 
@@ -60,30 +59,30 @@
 }
 
 # Can't use `readlink -f' because it doesn't ship with Rtools
-source="'$(cd "${1}"; pwd)'"    #'
+source="'${1}'"
 
-if [ ${#} -eq 1 ]
+if test ${#} -eq 1
 then target="NULL"
 else
-    if [[ ${destructive} = "TRUE" ]]
+    if test "${destructive}" = "TRUE"
     then warning "Both -d (Destructive) and TARGET specified; using TARGET."
         destructive="FALSE"
     fi
-    target="'$(cd "${2}"; pwd)'" #'
+    target="'${2}'"
 fi
 
-if [[ ${destructive} = "TRUE" ]]
+if test "${destructive}" = "TRUE"
 then
-    if [[ ${unlink} = "TRUE" ]]
+    if test "${unlink}" = "TRUE"
     then warning "Specified -d (Destructive) and -u (Unlink); unsetting -u."
         unlink="FALSE"
     fi
     target="${source}"
 fi
 
-if [[ "${source}" = "${target}" || ${destructive} = "TRUE" ]]
+if test "${source}" = "${target}" -o "${destructive}" = "TRUE"
 then
-    if [[ ${unlink} = "TRUE" ]]
+    if test "${unlink}" = "TRUE"
     then warning "SOURCE and TARGET are identical; unsetting -u (Unlink)."
         unlink="FALSE"
     fi
@@ -94,8 +93,7 @@
 : ${copy:="TRUE"}
 
 debug () {
-    printf "source: %s; target: %s; copy: %s; unlink: %s" \
-        ${source} ${target} ${copy} ${unlink}
+    echo source: "${source}"\; target: "${target}"\; copy: "${copy}"\; unlink: "${unlink}"
 }
 
 R_EXE="${R_HOME}/bin/R"



More information about the Roxygen-commits mailing list