Skip to content

Commit 125f36b

Browse files
update mac filed exit
1 parent 25c032b commit 125f36b

File tree

1 file changed

+41
-10
lines changed

1 file changed

+41
-10
lines changed

paddle/scripts/fast_install.sh

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,27 +347,52 @@ function PipLinuxInstall(){
347347
if [[ "$GPU" == "gpu" ]];then
348348
if [[ ${AVX} == "avx" ]];then
349349
rm -rf `echo $wheel_gpu_release|awk -F '/' '{print $NF}'`
350-
wget $wheel_gpu_release
351-
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release
350+
wget -q $wheel_gpu_release
351+
if [ "$?" != "0" ];then
352+
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release
353+
else
354+
echo paddlepaddle whl包下载失败
355+
exit 1
356+
fi
352357
else
353358
rm -rf `echo $wheel_gpu_release_novax|awk -F '/' '{print $NF}'`
354-
wget $wheel_gpu_release_novax
355-
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release_noavx
359+
wget -q $wheel_gpu_release_novax
360+
if [ "$?" != "0" ];then
361+
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_release_noavx
362+
else
363+
echo paddlepaddle whl包下载失败
364+
exit 1
365+
fi
356366
fi
357367
else
358368
rm -rf `echo $wheel_cpu_release|awk -F '/' '{print $NF}'`
359-
wget $wheel_cpu_release
360-
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_release
369+
wget -q $wheel_cpu_release
370+
if [ "$?" != "0" ];then
371+
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_release
372+
else
373+
echo paddlepaddle whl包下载失败
374+
exit 1
375+
fi
361376
fi
362377
else
363378
if [[ "$GPU" == "gpu" ]];then
364379
rm -rf `echo $wheel_gpu_develop|awk -F '/' '{print $NF}'`
365-
wget $wheel_gpu_develop
366-
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_develop
380+
wget -q $wheel_gpu_develop
381+
if [ "$?" != "0" ];then
382+
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_gpu_develop
383+
else
384+
echo paddlepaddle whl包下载失败
385+
exit 1
386+
fi
367387
else
368388
rm -rf `echo $wheel_cpu_develop|awk -F '/' '{print $NF}'`
369-
wget $wheel_cpu_develop
370-
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_develop
389+
wget -q $wheel_cpu_develop
390+
if [ "$?" != "0" ];then
391+
$pip_path install --user -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com $wheel_cpu_develop
392+
else
393+
echo paddlepaddle whl包下载失败
394+
exit 1
395+
fi
371396
fi
372397
fi
373398
}
@@ -748,6 +773,7 @@ function macos() {
748773
echo""
749774
echo "=========================================================================================="
750775
echo""
776+
exit 1
751777
fi
752778
else
753779
wget ${path}$wheel_cpu_release -O $whl_cpu_release
@@ -763,13 +789,15 @@ function macos() {
763789
echo""
764790
echo "=========================================================================================="
765791
echo""
792+
exit 1
766793
fi
767794
else
768795
rm $whl_cpu_release
769796
echo "未能正常安装PaddlePaddle,请检查您的网络,或者ctrl + c退出后反馈至https://github.com/PaddlePaddle/Paddle/issues"
770797
echo""
771798
echo "=========================================================================================="
772799
echo""
800+
exit 1
773801
fi
774802
fi
775803
else
@@ -784,6 +812,7 @@ function macos() {
784812
echo""
785813
echo "=========================================================================================="
786814
echo""
815+
exit 1
787816
fi
788817
else
789818
wget ${path}$whl_cpu_develop -O $whl_cpu_develop
@@ -799,13 +828,15 @@ function macos() {
799828
echo""
800829
echo "=========================================================================================="
801830
echo""
831+
exit 1
802832
fi
803833
else
804834
rm $whl_cpu_develop
805835
echo "未能正常安装PaddlePaddle,请检查您的网络,或者ctrl + c退出后反馈至https://github.com/PaddlePaddle/Paddle/issues"
806836
echo""
807837
echo "=========================================================================================="
808838
echo""
839+
exit 1
809840
fi
810841
fi
811842
fi

0 commit comments

Comments
 (0)