@@ -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
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> --- utils/br-reproduce-build | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)