I have this installer shell script in a bash script.
- I am doing a rename of the existing text file (backing it up).
- I remove old file
Copy fresh file to the target dir
mv /target/data.ini /target/data_$(date +"%Y%m%d_%H%M%S").ini rm -f /target/data.ini cp /install/data.ini /target/data.ini
For some reason the cp command does not always copy the file.
Is it possible that previous mv or rm operation was not completed?
I am unable to see any error since its running as part of the script; if I execute the commands manually it's working fine.