()
Run update routine
Run update routine
Run update routine
def update():
    """Run update routine
    """
    if not util.does_file_exist('./.git/config'):
        util.Error('Not a git repo; please checkout from Github with \n\t'
                'git clone http://github.com/hatRiot/zarp.git\n to update.')
    else:
        util.Msg('Updating Zarp...')
        ret = util.init_app('git branch -a | grep \'* dev\'', True)
        if len(ret) > 3:
            util.Error('You appear to be on the dev branch.'
                        'Please switch off dev to update.')
            return

        ret = util.init_app('git pull git://github.com/hatRiot/zarp.git HEAD')
        if 'Already up-to-date' in ret:
            util.Msg('Zarp already up to date.')
        elif 'fatal' in ret:
            util.Error('Error updating Zarp: %s' % ret)
        else:
            from util import version
            util.Msg('Zarp updated to version %s' % (version()))
def update ( ) : if not util . does_file_exist ( './.git/config' ) : util . Error ( 'Not a git repo; please checkout from Github with \n\t' 'git clone http://github.com/hatRiot/zarp.git\n to update.' ) else : util . Msg ( 'Updating Zarp...' ) ret = util . init_app ( 'git branch -a | grep \'* dev\'' , True ) if len ( ret ) > 3 : util . Error ( 'You appear to be on the dev branch.' 'Please switch off dev to update.' ) return ret = util . init_app ( 'git pull git://github.com/hatRiot/zarp.git HEAD' ) if 'Already up-to-date' in ret : util . Msg ( 'Zarp already up to date.' ) elif 'fatal' in ret : util . Error ( 'Error updating Zarp: %s' % ret ) else : from util import version util . Msg ( 'Zarp updated to version %s' % ( version ( ) ) )