aboutsummaryrefslogtreecommitdiff
path: root/utils/br-reproduce-build
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2015-04-12 14:42:12 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-04-12 19:28:32 +0200
commitc6b5c6ca7912f4b2e017c2016c421f1512332d46 (patch)
treec1b0777a83525eef28e6ca87bca3300413a43f78 /utils/br-reproduce-build
parenta7226db951d7e542b8a6b9b13e94a29a22879aff (diff)
downloadbuildroot-test-c6b5c6ca7912f4b2e017c2016c421f1512332d46.tar.gz
buildroot-test-c6b5c6ca7912f4b2e017c2016c421f1512332d46.tar.bz2
br-reproduce-build: quote variables
Even though we do not really support building in a path that contains spaces (or other weird characters), it's still better to quote variables. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'utils/br-reproduce-build')
-rwxr-xr-xutils/br-reproduce-build24
1 files changed, 12 insertions, 12 deletions
diff --git a/utils/br-reproduce-build b/utils/br-reproduce-build
index 01d1b7a..0ecfb54 100755
--- a/utils/br-reproduce-build
+++ b/utils/br-reproduce-build
@@ -16,30 +16,30 @@ if [ $# -ne 1 ] ; then
exit 1 ;
fi
-BUILD_ID=$1
+BUILD_ID="$1"
-BUILD_DIR=${OUTPUT_DIR}/${BUILD_ID}
+BUILD_DIR="${OUTPUT_DIR}/${BUILD_ID}"
-mkdir -p ${BUILD_DIR}
+mkdir -p "${BUILD_DIR}"
if [ $? -ne 0 ] ; then
echo "Cannot create output directory"
exit 1
fi
-wget -O ${BUILD_DIR}/config http://autobuild.buildroot.org/results/${BUILD_ID}/config
+wget -O "${BUILD_DIR}/config" "http://autobuild.buildroot.org/results/${BUILD_ID}/config"
if [ $? -ne 0 ] ; then
echo "Cannot get configuration for build ${BUILD_ID}"
- rm -f ${BUILD_DIR}
+ rm -f "${BUILD_DIR}"
exit 1
fi
-wget -O ${BUILD_DIR}/gitid http://autobuild.buildroot.org/results/${BUILD_ID}/gitid
+wget -O "${BUILD_DIR}/gitid" "http://autobuild.buildroot.org/results/${BUILD_ID}/gitid"
-cd ${BUILD_DIR}
-git clone ${BASE_GIT} buildroot
+cd "${BUILD_DIR}"
+git clone "${BASE_GIT}" buildroot
if [ $? -ne 0 ] ; then
echo "Cannot clone Buildroot Git repository"
- rm -rf ${BUILD_DIR}
+ rm -rf "${BUILD_DIR}"
exit 1
fi
@@ -50,17 +50,17 @@ git remote set-url origin git://git.busybox.net/buildroot
git fetch
if [ $? -ne 0 ] ; then
echo "Cannot fetch Buildroot official Git repository"
- rm -rf ${BUILD_DIR}
+ rm -rf "${BUILD_DIR}"
exit 1
fi
git checkout $(cat ../gitid)
if [ $? -ne 0 ] ; then
echo "Cannot checkout commit " $(cat ../gitid)
- rm -rf ${BUILD_DIR}
+ rm -rf "${BUILD_DIR}"
exit 1
fi
mkdir ../output
-cp ${BUILD_DIR}/config ../output/.config
+cp "${BUILD_DIR}/config" ../output/.config
make 2>&1 O=../output | tee logfile