Skip to content

Commit 1281eec

Browse files
committed
feat(install.sh): 잘못된 tar 파일을 받았을 경우에 대한 예외처리
1 parent 2196017 commit 1281eec

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎install.sh‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# 위에 있는 링크에서 설문을 마치면 주는 다운로드 파일의 url 주소로 바꿔주어야 합니다.
44
# =============================================================================
55

6-
download_url="https://developer.download.nvidia.com/compute/cudnn/secure/8.9.6/local_installers/11.x/cudnn-linux-x86_64-8.9.6.50_cuda11-archive.tar.xz?..."
6+
download_url="https://developer.download.nvidia.com/compute/cudnn/..."
77

88

99
# =============================================================================
@@ -13,14 +13,22 @@ download_url="https://developer.download.nvidia.com/compute/cudnn/secure/8.9.6/l
1313
# 본 스크립트는 다음의 가이드에 따라 작업을 수행합니다.
1414
# https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html
1515

16-
download_dirname="cudnn"
16+
download_dirname="./cudnn"
1717
download_filename="$download_dirname.tar.xz"
1818

1919
wget -O $download_filename $download_url
2020

2121
# 1.3. Installing on Linux
2222
# 1.3.1. Tar File Installation
23-
tar -xvf $download_at
23+
tar -xvf $download_filename
24+
25+
if [ "$?" -ne 0 ]; then
26+
echo "============================================================================="
27+
echo " 다운 받은 파일이 TAR 압축 파일이 아닐 수도 있습니다."
28+
echo " $download_filename 을 확인해보십시오."
29+
echo "============================================================================="
30+
exit 1
31+
fi
2432

2533
cd $download_dirname
2634

0 commit comments

Comments
 (0)