Add update.sh and detect os function