[crochet] Introduce SVN_CMD at lib/subversion.sh
Warner Losh
imp at bsdimp.com
Fri Jun 27 15:25:02 UTC 2014
On Jun 27, 2014, at 9:12 AM, Boris Samorodov <bsam at passap.ru> wrote:
> Signed PGP part
> 27.06.2014 18:53, Warner Losh пишет:
> >
> > On Jun 27, 2014, at 4:47 AM, Boris Samorodov <bsam at passap.ru> wrote:
> >
> >> Hi Tim, All!
> >>
> >> Sometimes I use systems which have only svnlite version.
> >> I propose a patch to let crochet work at those systems as well:
> >
> > Where is SVN_CMD set?
>
> Look further at [*]
Ah. Need more caffeine.
> > Most other things in the system would just call this SVN. Is there a reason we need the _CMD?
>
> No reason. The name was inspired by the port's system (like ECHO_CMD,
> etc.). I'm fine with whatever name.
Yea, some parts of the project like to have a _CMD (like ports), while other parts only do _CMD
when the command name has been stolen for something else (like the build and nanobsd).
Warner
> > Warner
> >
> >> -----
> >> --- lib/subversion.sh.orig 2014-03-30 13:28:41.000000000 +0400
> >> +++ lib/subversion.sh 2014-06-27 14:37:01.668105743 +0400
> >> @@ -1,15 +1,16 @@
> >> +: ${SVN_CMD:=`which svn 2>/dev/null || which svnlite 2>/dev/null`}
>
> [*]
>
> >> svn_update_sourcetree ( ) {
> >> echo "Updating source tree ${FREEBSD_SRC}"
> >> cd ${FREEBSD_SRC}
> >> - svn update > ${WORKDIR}/_.svnupdate.log
> >> + ${SVN_CMD} update > ${WORKDIR}/_.svnupdate.log
> >> cd ${TOPDIR}
> >> }
> >>
> >> svn_get_revision ( ) {
> >> _PWD=`pwd`
> >> cd ${FREEBSD_SRC}
> >> - SOURCE_VERSION=`svn info |grep Revision: |cut -c11-`
> >> + SOURCE_VERSION=`${SVN_CMD} info |grep Revision: |cut -c11-`
> >> cd $_PWD
> >> echo "Source version is: ${SOURCE_VERSION:-unknown}";
> >> }
> >> -----
>
> --
> WBR, Boris Samorodov (bsam)
> FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140627/22e1e541/attachment.sig>
More information about the freebsd-arm
mailing list