Check if directory already exists

This commit is contained in:
Bob Mottram 2016-10-10 22:00:58 +01:00
parent 6190639144
commit e76a9d4e0a
1 changed files with 5 additions and 3 deletions

View File

@ -469,9 +469,11 @@ function mesh_tox_node {
if [ ! -d ${rootdir}${INSTALL_DIR} ]; then
mkdir -p ${rootdir}${INSTALL_DIR}
fi
git clone ${TOXCORE_REPO} ${rootdir}${INSTALL_DIR}/toxcore
if [ ! "$?" = "0" ]; then
exit 429252
if [ ! -d ${rootdir}${INSTALL_DIR}/toxcore ]; then
git clone ${TOXCORE_REPO} ${rootdir}${INSTALL_DIR}/toxcore
if [ ! "$?" = "0" ]; then
exit 429252
fi
fi
cd ${rootdir}$INSTALL_DIR/toxcore
git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT