[Buildroot] [PATCH 3/4] br-reproduce-build: fix URL of gitid

Yann E. MORIN yann.morin.1998 at free.fr
Sat Feb 14 10:52:05 UTC 2015


Reported-by: Fabio Porcedda <fabio.porcedda at gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
---
 utils/br-reproduce-build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils/br-reproduce-build b/utils/br-reproduce-build
index c0dc530..9987684 100755
--- a/utils/br-reproduce-build
+++ b/utils/br-reproduce-build
@@ -16,9 +16,11 @@ if [ $# -ne 1 ] ; then
     exit 1 ;
 fi
 
-BUILD_ID=$1
+# BUILD_ID must be in the form xxx/xxxyyyyyyyyyy (xxxyyyyy... being the sha1)
+BUILD_ID="${1#*/}"
+BUILD_ID="${BUILD_ID%${BUILD_ID#???}}/${BUILD_ID}"
 
-BUILD_DIR=${OUTPUT_DIR}/${BUILD_ID}
+BUILD_DIR="${OUTPUT_DIR}/${BUILD_ID#*/}"
 
 mkdir -p ${BUILD_DIR}
 if [ $? -ne 0 ] ; then
-- 
1.9.1




More information about the buildroot mailing list