]> Zhao Yanbai Git Server - minix.git/commitdiff
Ensure correct NetBSD sources checkout
authorLionel Sambuc <lionel@minix3.org>
Mon, 3 Dec 2012 14:06:12 +0000 (14:06 +0000)
committerLionel Sambuc <lionel@minix3.org>
Fri, 7 Dec 2012 12:58:06 +0000 (13:58 +0100)
Previously, under some circumstances, the make command could
yield netbsdsrc in other directories than the source directory,
as expected.

This patch fixes this behaviour, by first changing to the expected
directory, and only at the end going back to the original directory.

releasetools/Makefile

index 5d90d2714c0507bc95248426e4d6793a144a2a38..542c9da7409ba6bacac09b77d8586ffc3cde11bd 100644 (file)
@@ -111,15 +111,18 @@ install:
 # download and update NetBSD reference sources.
 nbsd_fetch:
        export CVS_RSH=ssh;                                                     \
+       export OLDPWD=`pwd`;                                                    \
        echo "retrieving hierarchies from ${NBSD_CVSROOT}";                     \
        IFS=,;                                                                  \
-       cat nbsd_ports | grep -v '^#' | while read port ;                       \
+       cd ..;                                                                  \
+       cat releasetools/nbsd_ports | grep -v '^#' | while read port ;          \
        do      set $$port;                                                     \
                date=$$1; minixpath=$$2; origpath=$$3;                          \
                if [ $$# -lt 3 ]; then origpath=$$2; fi;                        \
                echo "retrieving $$origpath ..";                                \
-               cd .. && cvs -q -d ${NBSD_CVSROOT} co -N -D "$$date UTC" -d nbsdsrc "src/$$origpath" ; \
-       done
+               cvs -q -d ${NBSD_CVSROOT} co -N -D "$$date UTC" -d nbsdsrc "src/$$origpath" ; \
+       done;                                                                   \
+       cd $${OLDPWD};
 
 nbsd_diff:
        find .. -name minix-port.patch | xargs rm