[source] scripts: ipkg-build: do not require git or svn

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 15 04:33:37 PDT 2016


jow pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=3a3424981c27e3c3ca35e076bcc0f399f86649c3

commit 3a3424981c27e3c3ca35e076bcc0f399f86649c3
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Mon Aug 15 13:27:11 2016 +0200

    scripts: ipkg-build: do not require git or svn
    
    Move the "which svn" and "which git" calls next to the timestamp commands
    using those tools to not prematurely fail on systems where svn or git are
    not present.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 scripts/ipkg-build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index e026c7a..845a6ed 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -13,14 +13,14 @@ version=1.0
 FIND="$(which find)"
 FIND="${FIND:-$(which gfind)}"
 TAR="${TAR:-$(which tar)}"
-SVN="$(which svn)"
-GIT="$(which git)"
 GZIP="$(which gzip)"
 
 # look up date of last commit
 if [ -d "$TOPDIR/.git" ]; then
+	GIT="$(which git)"
 	TIMESTAMP=$(cd $TOPDIR; $GIT log -1 -s --format=%ci)
 elif [ -d "$TOPDIR/.svn" ]; then
+	SVN="$(which svn)"
 	TIMESTAMP=$($SVN info "$TOPDIR" | sed -n "s/^Last Changed Date: \(.*\)/\1/p")
 else
 	TIMESTAMP=$(date)



More information about the lede-commits mailing list