#!/usr/bin/python3
# This file is placed in the Public Domain.

import os

def open(txt):
    try:
        for line in os.popen(txt).readlines():
            print(line.rstrip())
    except:
        pass

def main():
    open("bin/clean")
    open("python3 setup.py sdist")
    open("python3 -mvirtualenv -p python3 env")
    open("env/bin/python3 env/bin/pip3 install -f dist ob --upgrade --force-reinstall")
    open("cp bin/ob env/bin")

if __name__ == "__main__":
    main()
