Install or update latest Pencil version 2, a GUI prototyping tool.

    Tip: For svg exports displayed proper in other programs (eg. inkscape,
    okular, reveal.js presentations) only use the 'Common Shapes' and
    'Desktop - Sketchy GUI' elements.

    More info:
        github repo (forked version 2): https://github.com/prikhi/pencil

def pencil2():
    '''Install or update latest Pencil version 2, a GUI prototyping tool.

    Tip: For svg exports displayed proper in other programs (eg. inkscape,
    okular, reveal.js presentations) only use the 'Common Shapes' and
    'Desktop - Sketchy GUI' elements.

    More info:
        github repo (forked version 2): https://github.com/prikhi/pencil
    '''
    repo_name = 'pencil2'
    repo_dir = flo('~/repos/{repo_name}')

    print_msg('## fetch latest pencil\n')
    checkup_git_repo_legacy(url='https://github.com/prikhi/pencil.git',
                            name=repo_name)

    print_msg('\n## build properties\n')
    update_or_append_line(flo('{repo_dir}/build/properties.sh'),
                          prefix='export MAX_VERSION=',
                          new_line="export MAX_VERSION='100.*'")
    run(flo('cat {repo_dir}/build/properties.sh'))

    run(flo('cd {repo_dir}/build && ./build.sh  linux'),
        msg='\n## build pencil\n')
    install_user_command_legacy('pencil2', pencil2_repodir=repo_dir)
    print_msg('\nNow You can start pencil version 2 with this command:\n\n'
              '    pencil2')