def fresh_dir(dir_path): rm_rf(dir_path) assert not exists(dir_path) os.mkdir(dir_path)
def pkgbuild_script(name, info, src, dst='postinstall'): fresh_dir(SCRIPTS_DIR) fresh_dir(PACKAGE_ROOT) move_script(join(OSX_DIR, src), join(SCRIPTS_DIR, dst), info) pkgbuild(name) rm_rf(SCRIPTS_DIR)