issue/2871 - Fix the framework copy and codesigining issues

Forget the other one... that one is cleaner!
To match the code style of the copy resources script, I would add a space between the condition and then
```diff
-];then
+]; then
```