Update script to use a function, allows updating multiple installations now.

Signed-off-by: Yoshi2889 <rick.2889@gmail.com>