diff --git a/Makefile.am b/Makefile.am index 5242b48ee49..0448e1b3d11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -598,4 +598,4 @@ PYTHON_SRCS := redex.py \ $(GENERATED_API_LEVELS_MODULE) redex: redex-all $(PYTHON_SRCS) - $(srcdir)/bundle-redex.sh "$(srcdir)" + SRC_DIR="$(srcdir)" $(srcdir)/bundle-redex.sh diff --git a/bundle-redex.sh b/bundle-redex.sh index 23f49c45cad..2ba05b1d1e3 100755 --- a/bundle-redex.sh +++ b/bundle-redex.sh @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +set -e + SRC_DIR="${SRC_DIR:-.}" if [ -f "generated_apilevels.py" ] ; then @@ -12,6 +14,6 @@ else GEN_APILEVELS_INPUT= fi -tar czf redex.tar.gz redex-all "${SRC_DIR}/redex.py" "${SRC_DIR}/pyredex/*.py" $GEN_APILEVELS_INPUT +tar czf redex.tar.gz redex-all "${SRC_DIR}/redex.py" "${SRC_DIR}"/pyredex/*.py $GEN_APILEVELS_INPUT cat "${SRC_DIR}/selfextract.sh" redex.tar.gz > redex chmod +x redex