Remove bin.orig if it already exists (fixes #687)

The directory may exist if the `build_package_symlink_version_suffix`
ran multiple times.
This commit is contained in:
Yamashita, Yuu 2016-09-14 09:49:43 +09:00
parent 36647a66de
commit bc4abf06bd

View file

@ -1470,9 +1470,8 @@ build_package_symlink_version_suffix() {
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
if [ -e "${PREFIX_PATH}/bin" ]; then if [ -e "${PREFIX_PATH}/bin" ]; then
# Always create `bin` as symlink to framework path if the version was built with `--enable-frameowrk` (#590) # Always create `bin` as symlink to framework path if the version was built with `--enable-frameowrk` (#590)
if [ ! -e "${PREFIX_PATH}/bin.orig" ]; then rm -rf "${PREFIX_PATH}/bin.orig"
mv -f "${PREFIX_PATH}/bin" "${PREFIX_PATH}/bin.orig" mv -f "${PREFIX_PATH}/bin" "${PREFIX_PATH}/bin.orig"
fi
fi fi
# Only symlinks are installed in ${PREFIX_PATH}/bin # Only symlinks are installed in ${PREFIX_PATH}/bin
ln -fs "${PREFIX_PATH}/Python.framework/Versions/Current/bin" "${PREFIX_PATH}/bin" ln -fs "${PREFIX_PATH}/Python.framework/Versions/Current/bin" "${PREFIX_PATH}/bin"