build: ignore PKG_SOURCE_DIR when not required

This commit is contained in:
MilhouseVH 2016-03-29 22:51:55 +01:00
parent 01b9aae849
commit 7a428cd73b

View File

@ -85,10 +85,12 @@ else
fi
fi
if [ -n "$PKG_SOURCE_DIR" ]; then
mv $BUILD/$PKG_SOURCE_DIR $BUILD/$PKG_NAME-$PKG_VERSION
elif [ -d $BUILD/$PKG_NAME-$PKG_VERSION* -a ! -d $BUILD/$PKG_NAME-$PKG_VERSION ]; then
mv $BUILD/$PKG_NAME-$PKG_VERSION* $BUILD/$PKG_NAME-$PKG_VERSION
if [ ! -d $BUILD/$PKG_NAME-$PKG_VERSION ]; then
if [ -n "$PKG_SOURCE_DIR" ]; then
mv $BUILD/$PKG_SOURCE_DIR $BUILD/$PKG_NAME-$PKG_VERSION
elif [ -d $BUILD/$PKG_NAME-$PKG_VERSION* ]; then
mv $BUILD/$PKG_NAME-$PKG_VERSION* $BUILD/$PKG_NAME-$PKG_VERSION
fi
fi
if [ -d "$PKG_DIR/sources" ]; then