echo"[INFO] Starting a plain mass copy with $numargs files..."
for((i=1; i <=$numargs; i++));do
SRC_full=$(realpath $2)
DST_full=$(echo$SRC_full| sed -E "s|$LOC_trunk|$LOC_out|")
echo"[INFO] Copying $SRC_full to $DST_full..."
cp -R $SRC_full$DST_full
shift
done
echo"[SUCCESS] Copying finished. Files should be visible via the local webserver now."
exit0
fi
SRC_rel=$1# e.g. index.en.xhtml
SRC_full=$(realpath $SRC_rel)# Full path to source file
# CHECK whether the source file is located in LOC_trunk
if[ ! $(echo$SRC_full| grep "$LOC_trunk")];then
echo"[ERROR] Given source file is not part of \$LOC_trunk (currently set to \"$LOC_trunk\"). Please only build files which reside in or below this directory. Aborting now."
exit1
fi
# TEST if a DEV SVN directory is used. If yes, copy clean file to this Dir
if["$LOC_trunk_dev" !=""];then
SRC_full_dev=$(echo$SRC_full| sed -E "s|$LOC_trunk|$LOC_trunk_dev|")
echo"[INFO] A \"dirty\" Development SVN directory ($LOC_trunk_dev) is being used. Copy file from clean SVN directory ($LOC_trunk) to Development directory..."
cp $SRC_full$SRC_full_dev# copy file from clean SVN to dev/dirty SVN
SRC_full=$SRC_full_dev
LOC_trunk=$LOC_trunk_dev
fi
echo"[INFO] Using file $SRC_full as source..."
### TRANSFORM XHTML file path
DST_full=$(echo$SRC_full| sed -E "s|$LOC_trunk|$LOC_out|")# replace SVN directory by build/HTTP destination
### BUILD/COPY FILE depending on file extension
ftype=${SRC_full##*.}# get extension of file
ftype=$(echo"$ftype"| tr '[:upper:]''[:lower:]')
ftype_build="xhtml"# file types which have to be built