I am at a loss here, trying to find out the reason why a shell script that is basically copying a couple of files and directories from one place to another will result in the content of two of the files (and only those two) being purged and replaced by
APPFOLDER="/home/opt/ke" CMD_APPCOPY="cp -fr _opt/ke/* $APPFOLDER" [...] echo "copying app-files to app-folder $APPFOLDER ..." eval $CMD_APPCOPY if [ $? -ne 0 ] ; then echo "could not copy app-files to app-folder $APPFOLDER" exit fi
If I start the file copy by hand everything is fine.
cp -fr _opt/ke/* /home/opt/ke
But if I run the script the two files will be empty except for the
link ../../modules/[name_of_file] part added on top of the empty file.
The two files in question are neither very huge or very small in size, the only thing that differentiate them from the other files in that directory is that they are of the Perl-Module .pm type. Their actual source destination is
/home/xxx/xxx/deploy/KEB/_opt/ke/modules/ while the full target destination is
/home/opt/ke/modules/. The script and the manual copy are run from
/home/xxx/xxx/deploy/KEB/ of course.
Any idea/advice how this behaviour could be explained or what I should be looking for in order to fix the script is very much appreciated.