Selaa lähdekoodia

Check if directory already exists

Bob Mottram 8 vuotta sitten
vanhempi
commit
e76a9d4e0a
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5
    3
      src/freedombone-app-tox

+ 5
- 3
src/freedombone-app-tox Näytä tiedosto

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