Only mv bin to bin.orig the first time, otherwise the mv will fail

This commit is contained in:
s1341 2016-09-05 12:03:10 +03:00 committed by Yamashita, Yuu
parent 79fca42c35
commit 36647a66de

View file

@ -1470,8 +1470,10 @@ 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
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"
fi fi