|
|
|
@ -177,11 +177,14 @@ else
|
|
|
|
|
# Empty the current directory of all contents
|
|
|
|
|
rm * -R # note: hidden files and subdir unaffected
|
|
|
|
|
# Return the stuff we want to keep after wipe-dir
|
|
|
|
|
# (we are of course assuming that the following 4 file(type)s always exist)
|
|
|
|
|
# (if in fact they do not exist, use conditional statements instead (see below)
|
|
|
|
|
cp /home/taha/chepec/tmp/$tmpdirname/*.Rnw .
|
|
|
|
|
cp /home/taha/chepec/tmp/$tmpdirname/vc .
|
|
|
|
|
cp /home/taha/chepec/tmp/$tmpdirname/vc.tex .
|
|
|
|
|
cp /home/taha/chepec/tmp/$tmpdirname/vc-git.awk .
|
|
|
|
|
# Return stuff that may not always exist (check first...)
|
|
|
|
|
## Return stuff that may not always exist (check first...)
|
|
|
|
|
## The use of conditionals is mainly to avoid annoying "file does not exist" messages...
|
|
|
|
|
# Return *.Rproj file (removal is unnecessary and makes RStudio less useful)
|
|
|
|
|
Rprojfiles=`ls -1 /home/taha/chepec/tmp/$tmpdirname/*.Rproj 2>/dev/null | wc -l`
|
|
|
|
|
if [ $Rprojfiles != 0 ]; then
|
|
|
|
@ -192,6 +195,11 @@ else
|
|
|
|
|
if [ $rdafiles != 0 ]; then
|
|
|
|
|
cp /home/taha/chepec/tmp/$tmpdirname/*.rda .
|
|
|
|
|
fi
|
|
|
|
|
# Return *.Rmd files (R markdown source files)
|
|
|
|
|
Rmdfiles=`ls -1 /home/taha/chepec/tmp/$tmpdirname/*.Rmd 2>/dev/null | wc -l`
|
|
|
|
|
if [ $Rmdfiles != 0 ]; then
|
|
|
|
|
cp /home/taha/chepec/tmp/$tmpdirname/*.Rmd .
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Terminating..."
|
|
|
|
|