]> git.pond.sub.org Git - empserver/commitdiff
Apply the patches using git apply instead of patch
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 16 Feb 2008 17:09:19 +0000 (11:09 -0600)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 16 Feb 2008 17:09:19 +0000 (11:09 -0600)
Need to be in the empserver directory before applying
the "git apply" command, move the "cd empserver" to the
clone step. This change also fixes a bug when using
with an existing repository not being the correct
directory when executing the "git pull" command.
Fixes commit acd768e5e2 as it used git diff format.

src/scripts/nightly/nightlybuild.sh

index 67c6bf69ee9a8a08d1bcf8fd4e476df37c42bbcb..b73951b876547e98aeecfac119acd06e9e2f7433 100755 (executable)
@@ -112,7 +112,9 @@ then
                RETR="`expr 1 + ${RETR}`"
                [ "${RETR}" -gt 5 ] && err "git-clone Timeout after ${RETR} retres."
        done
+       cd empserver || err "Could not cd to ${BOXDIR}/${WORKDIR}/empserver."
 else
+       cd empserver || err "Could not cd to ${BOXDIR}/${WORKDIR}/empserver."
        while ! git pull $GITROOT master >/dev/null
        do
                sleep "`expr 5 + ${RETR}`"
@@ -142,7 +144,7 @@ echo "Applying global patches from ${BOXDIR}/${WORKDIR}/empserver/src/scripts/ni
 for i in "${BOXDIR}/${WORKDIR}/empserver/src/scripts/nightly/patches/All"/*.patch
 do
        [ -r "${i}" ] || continue
-       if ${PATCH:=patch} -Np0 < "${i}" >/dev/null
+       if git apply "${i}" >/dev/null
        then
                echo "${i}: OK"
        else
@@ -159,7 +161,7 @@ then
        for i in "${LOCALPATCHDIRECTORY}"/*.patch
        do
                [ -r "${i}" ] || continue
-               if ${PATCH:=patch} -Np0 < "${i}" >/dev/null
+               if git apply "${i}" >/dev/null
                then
                        echo "${i}: OK"
                else
@@ -170,8 +172,6 @@ then
        echo ""
 fi
 
-cd empserver || err "Could not cd to ${BOXDIR}/${WORKDIR}/empserver."
-
 git-pull
 sh ./bootstrap
 ./configure --prefix ${BOXDIR}/${WORKDIR}/emp4