X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=make-builder.as;fp=make-builder.as;h=5eceb5fb1f0088983e6d0b784a8189cc6b2222f5;hb=c754ff8cdbc4590c6fb8b17cf08544c6cf287ddc;hp=e7fd623a5f6658c8439869cf868474823ce048d6;hpb=898ab60c52851ccc9df653ddcabcd16917831f57;p=pspp diff --git a/make-builder.as b/make-builder.as index e7fd623a5f..5eceb5fb1f 100644 --- a/make-builder.as +++ b/make-builder.as @@ -159,10 +159,20 @@ esac # Ensure that git repository exists. GIT_DIR=$PWD/repo.git export GIT_DIR -git init +if git init >/dev/null; then + : +else + exec >&2 + AS_ERROR([initializing Git repository in $GIT_DIR failed]) +fi # Fetch PSPP source. -git fetch $PSPP_REPO +$PSPP_BRANCH:refs/builds/$BUILD_NUMBER/pspp +if git fetch $PSPP_REPO +$PSPP_BRANCH:refs/builds/$BUILD_NUMBER/pspp >/dev/null 2>&1; then + : +else + exec >&2 + AS_ERROR([failed to fetch branch $PSPP_BRANCH from $PSPP_REPO]) +fi # Get PSPP commit number. PSPP_COMMIT=`git rev-parse refs/builds/$BUILD_NUMBER/pspp` @@ -178,7 +188,12 @@ if git rev-parse --verify --quiet $GNULIB_COMMIT^0 > /dev/null; then : else # We don't have the right commit yet, update Gnulib. - git fetch $GNULIB_REPO +refs/heads/*:refs/remotes/gnulib/* + if git fetch $GNULIB_REPO '+refs/heads/*:refs/remotes/gnulib/*'; then + : + else + exec >&2 + AS_ERROR([failed to fetch commit $GNULIB_COMMIT from $GNULIB_REPO]) + fi fi git update-ref refs/builds/$BUILD_NUMBER/gnulib $GNULIB_COMMIT @@ -215,3 +230,13 @@ mkdir "$outdir/build-aux" for base in gendocs.sh gendocs_template gendocs_template_min; do cp "build-aux/$base" "$outdir/build-aux/" done + +cat <