From 579692d15d3fc0d5582ab8b3b41c60590fc429b2 Mon Sep 17 00:00:00 2001 From: Conrad Lara - KG6JEI Date: Sat, 17 Dec 2016 09:38:57 -0800 Subject: [PATCH] bugfix: Correct final output image file name. After Change-Id: I4ac2a7aa903fb0d86f9a5200a4160e5028352fdd the build version is being put into the middle of the file name. Change-Id: I36c0d9b4c5bc509f45f3a8861bbfc1e97fea3f46 --- build/buildsteps/003-buildimage.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build/buildsteps/003-buildimage.sh b/build/buildsteps/003-buildimage.sh index 23e8a7cd..03b7b3bc 100755 --- a/build/buildsteps/003-buildimage.sh +++ b/build/buildsteps/003-buildimage.sh @@ -27,5 +27,14 @@ if [ ! -z "$BUILD_SET_VERSION" ]; then else MYBUILDNAME="${SHORT_BRANCH}-${BUILD_NUMBER}-${SHORT_COMMIT}" fi -rename "s/openwrt-ar71xx-generic/AREDN-$MYBUILDNAME/g" bin/ar71xx/* + +# Rename the images +find bin/ar71xx/ -not -path "*/packages/*" -type f | while read FILE +do + NEWNAME=$(echo "$FILE" | sed -r "s/openwrt-.*ar71xx-(generic)|(mikrotik)|(nand)/AREDN-$MYBUILDNAME/g") + if [ "$FILE" != "$NEWNAME" ] + then + mv "$FILE" "$NEWNAME" + fi +done