From bc4abf06bdd417eb15b4f52e3000561aa3d3f55f Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Wed, 14 Sep 2016 09:49:43 +0900 Subject: [PATCH] Remove `bin.orig` if it already exists (fixes #687) The directory may exist if the `build_package_symlink_version_suffix` ran multiple times. --- plugins/python-build/bin/python-build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index a4c6e511..43fd0be7 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1470,9 +1470,8 @@ build_package_symlink_version_suffix() { if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then if [ -e "${PREFIX_PATH}/bin" ]; then # Always create `bin` as symlink to framework path if the version was built with `--enable-frameowrk` (#590) - if [ ! -e "${PREFIX_PATH}/bin.orig" ]; then - mv -f "${PREFIX_PATH}/bin" "${PREFIX_PATH}/bin.orig" - fi + rm -rf "${PREFIX_PATH}/bin.orig" + mv -f "${PREFIX_PATH}/bin" "${PREFIX_PATH}/bin.orig" fi # Only symlinks are installed in ${PREFIX_PATH}/bin ln -fs "${PREFIX_PATH}/Python.framework/Versions/Current/bin" "${PREFIX_PATH}/bin"