We shouldn't support building packages from a tarball.

Suggested-by: Fathi Boudra <[email protected]>
Signed-off-by: Anders Roxell <[email protected]>
---
 scripts/common_pkg_build.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/common_pkg_build.sh b/scripts/common_pkg_build.sh
index cf4f6e3..eefc07d 100644
--- a/scripts/common_pkg_build.sh
+++ b/scripts/common_pkg_build.sh
@@ -10,7 +10,13 @@ prepare_tarball() {
        ./configure
        make dist
 
-       version=$(cat ${ROOT_DIR}/.scmversion)
+       if [[ -d ${ROOT_DIR}/.git ]]; then
+               version=$(cat ${ROOT_DIR}/.scmversion)
+       else
+               echo "This script isn't expected to be used without"
+               echo "a git repository."
+               exit 1
+       fi
 
        cp ${package}-${version}.tar.gz ${package}_${version}.orig.tar.gz
        tar xzf ${package}_${version}.orig.tar.gz
-- 
2.1.4

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to