[update.sh] update cp function and fix identation