浏览代码

Exit rather than return

Bob Mottram 9 年前
父节点
当前提交
c761ea62e6
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      src/freedombone-image-mesh

+ 4
- 4
src/freedombone-image-mesh 查看文件

289
 	echo $'Compiling toxcore' >> $INSTALL_LOG
289
 	echo $'Compiling toxcore' >> $INSTALL_LOG
290
 	if [ ! -d $INSTALL_DIR/toxcore ]; then
290
 	if [ ! -d $INSTALL_DIR/toxcore ]; then
291
 		echo $"$INSTALL_DIR/toxcore not found" >> $INSTALL_LOG
291
 		echo $"$INSTALL_DIR/toxcore not found" >> $INSTALL_LOG
292
-		return
292
+		exit 63856
293
 	fi
293
 	fi
294
 	cd $INSTALL_DIR/toxcore
294
 	cd $INSTALL_DIR/toxcore
295
 	SECONDS=0
295
 	SECONDS=0
301
 		echo $"Toxcore compile failed at $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed." >> $INSTALL_LOG
301
 		echo $"Toxcore compile failed at $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed." >> $INSTALL_LOG
302
 		echo $'Unable to make toxcore' >> $INSTALL_LOG
302
 		echo $'Unable to make toxcore' >> $INSTALL_LOG
303
 		echo $'See $INSTALL_DIR/make_toxcore.txt' >> $INSTALL_LOG
303
 		echo $'See $INSTALL_DIR/make_toxcore.txt' >> $INSTALL_LOG
304
-		return
304
+		exit 73835
305
 	fi
305
 	fi
306
 	rm $INSTALL_DIR/configure_toxcore.txt
306
 	rm $INSTALL_DIR/configure_toxcore.txt
307
 	rm $INSTALL_DIR/make_toxcore.txt
307
 	rm $INSTALL_DIR/make_toxcore.txt
312
 
312
 
313
 	if [ ! -f /usr/local/bin/tox-bootstrapd ]; then
313
 	if [ ! -f /usr/local/bin/tox-bootstrapd ]; then
314
 		echo $"File not found /usr/local/bin/tox-bootstrapd" >> $INSTALL_LOG
314
 		echo $"File not found /usr/local/bin/tox-bootstrapd" >> $INSTALL_LOG
315
-		return
315
+		exit 37825
316
 	fi
316
 	fi
317
 
317
 
318
 	useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment $"Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd
318
 	useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment $"Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd
389
 
389
 
390
 	if [ ! -d $INSTALL_DIR/toxic ]; then
390
 	if [ ! -d $INSTALL_DIR/toxic ]; then
391
 		echo $"$INSTALL_DIR/toxic not found" >> $INSTALL_LOG
391
 		echo $"$INSTALL_DIR/toxic not found" >> $INSTALL_LOG
392
-		return
392
+		exit 347835
393
 	fi
393
 	fi
394
 
394
 
395
 	cd $INSTALL_DIR/toxic
395
 	cd $INSTALL_DIR/toxic