File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 4747 run : |
4848 chmod +x install.sh
4949 ./install.sh --install-dir "~/.snm-demo"
50- # if [ ! -d ~/.snm-demo ]; then
51- # echo "Error: ~/.snm-demo directory not found!"
52- # exit 1
53- # fi
50+ if [ ! -d ~/.snm-demo ]; then
51+ echo "Error: ~/.snm-demo directory not found!"
52+ exit 1
53+ fi
5454 ls -l ~/.snm-demo
Original file line number Diff line number Diff line change @@ -78,7 +78,13 @@ download_snm() {
7878 fi
7979 DOWNLOAD_DIR=$( mktemp -d)
8080 echo " Downloading $URL ..."
81- mkdir -p " $INSTALL_DIR " & > /dev/null
81+ # 创建安装目录
82+ if ! mkdir -p " $INSTALL_DIR " 2> /dev/null; then
83+ echo " Failed to create directory: $INSTALL_DIR "
84+ echo " Please check permissions and try again."
85+ exit 1
86+ fi
87+
8288 if ! curl --progress-bar --fail -L " $URL " -o " $DOWNLOAD_DIR /$FILENAME " ; then
8389 echo " Download failed. Check that the release/filename are correct."
8490 exit 1
You can’t perform that action at this time.
0 commit comments