Skip to content

Commit

Permalink
scripts: ipkg-build: do not require git or svn
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jow- committed Aug 15, 2016
1 parent d9345bc commit 3a34249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ipkg-build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3a34249

Please sign in to comment.