From 4b224b0c010bba435e6a59161331effe656a8071 Mon Sep 17 00:00:00 2001 From: Taha Ahmed Date: Sat, 28 Jan 2012 23:18:28 +0100 Subject: [PATCH] Now checks if Rproj exists before attempting to copy it. Embarrasing oversight. Rproj file may not always exist (only created if an Rstudio project has been created in that directory). --- chertex.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chertex.sh b/chertex.sh index c6dc374..b39ca54 100755 --- a/chertex.sh +++ b/chertex.sh @@ -178,10 +178,13 @@ else rm * -R # note: hidden files and subdir unaffected # Return the stuff we want to keep after wipe-dir cp /home/taha/chepec/tmp/$tmpdirname/*.Rnw . - cp /home/taha/chepec/tmp/$tmpdirname/*.Rproj . - cp /home/taha/chepec/tmp/$tmpdirname/vc . + cp /home/taha/chepec/tmp/$tmpdirname/vc .e cp /home/taha/chepec/tmp/$tmpdirname/vc.tex . cp /home/taha/chepec/tmp/$tmpdirname/vc-git.awk . + # Ditto for the stuff that may not always exist... + if [ -e *.Rproj ]; then + cp /home/taha/chepec/tmp/$tmpdirname/*.Rproj . + fi fi echo "Terminating..."