#! /usr/bin/env python

import os
from abjad.cfg.cfg import ABJADPATH
from abjad.cfg._write_abjad_versionfile import _write_abjad_versionfile
from abjad.cfg._remove_abjad_pyc_files import _remove_abjad_pyc_files


## find start directory and project root
start_directory = os.path.abspath('.')
project_root = ABJADPATH.rstrip('abjad')

## svn update
os.chdir(project_root)
os.system('clear')
os.system('svn update')
os.chdir(start_directory)

## write version file
_write_abjad_versionfile( )

## remove Abjad *.pyc files
_remove_abjad_pyc_files( )
