Alpine linux: Below answer is only for case of single file: in alpine cp -n
not working (and false | cp -i ...
too) so solution working in my case that I found is:
if [ ! -f env.js ]; then cp env.example.js env.js; fi
In above example if env.js
file not exists then we copy env.example.js
to env.js
.