diff --git a/build.sh b/build.sh index 1f01ff22..d772ceec 100644 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ BUILD_WEB() { yarn yarn build mv dist .. - cd .. + cd .. || exit rm -rf alist-web } @@ -71,9 +71,9 @@ BUILD() { upx -9 ./alist-windows* find . -type f -print0 | xargs -0 md5sum >md5.txt cat md5.txt - cd .. + cd .. || exit fi - cd .. + cd .. || exit } BUILD_MUSL() { @@ -113,7 +113,7 @@ BUILD_MUSL() { export CGO_ENABLED=1 go build -o ./build/$appName-$os_arch -ldflags="$ldflags" -tags=jsoniter alist.go done - cd .. + cd .. || exit } RELEASE() { @@ -133,7 +133,7 @@ RELEASE() { for i in $(find . -type f -name "$appName-windows-*"); do zip compress/$(echo $i | sed 's/\.[^.]*$//').zip "$i" done - cd ../.. + cd ../.. || exit } if [ "$1" = "web" ]; then