summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-08-15 13:27:11 +0200
committerJo-Philipp Wich <jo@mein.io>2016-08-15 13:33:32 +0200
commit3a3424981c27e3c3ca35e076bcc0f399f86649c3 (patch)
treea5e107f328a71d29301acdd49edd2f7bd8256521 /scripts
parentd9345bc5bf8063ce433c0152893f93000fb0ddfb (diff)
downloadmaster-31e0f0ae-3a3424981c27e3c3ca35e076bcc0f399f86649c3.tar.gz
master-31e0f0ae-3a3424981c27e3c3ca35e076bcc0f399f86649c3.tar.bz2
master-31e0f0ae-3a3424981c27e3c3ca35e076bcc0f399f86649c3.zip
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@mein.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ipkg-build4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index e026c7a157..845a6ed04e 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)