瀏覽代碼

Check if directory already exists

Bob Mottram 9 年之前
父節點
當前提交
e76a9d4e0a
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5
    3
      src/freedombone-app-tox

+ 5
- 3
src/freedombone-app-tox 查看文件

469
     if [ ! -d ${rootdir}${INSTALL_DIR} ]; then
469
     if [ ! -d ${rootdir}${INSTALL_DIR} ]; then
470
         mkdir -p ${rootdir}${INSTALL_DIR}
470
         mkdir -p ${rootdir}${INSTALL_DIR}
471
     fi
471
     fi
472
-    git clone ${TOXCORE_REPO} ${rootdir}${INSTALL_DIR}/toxcore
473
-    if [ ! "$?" = "0" ]; then
474
-        exit 429252
472
+    if [ ! -d ${rootdir}${INSTALL_DIR}/toxcore ]; then
473
+        git clone ${TOXCORE_REPO} ${rootdir}${INSTALL_DIR}/toxcore
474
+        if [ ! "$?" = "0" ]; then
475
+            exit 429252
476
+        fi
475
     fi
477
     fi
476
     cd ${rootdir}$INSTALL_DIR/toxcore
478
     cd ${rootdir}$INSTALL_DIR/toxcore
477
     git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT
479
     git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT