summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorMichael Zuo <muh.muhten@gmail.com>2016-02-01 17:32:29 -0500
committerSören Tempel <soeren+git@soeren-tempel.net>2016-02-11 14:21:12 +0100
commit8d272af1742564fcdfe5253139b4f2074eb873f0 (patch)
tree4fb1c9dc2635836a246a359afc4ea0367da1c6d1 /abuild.in
parenta2c0a6897eefcf48bfefaadb1716c07d7efccd74 (diff)
downloadabuild-8d272af1742564fcdfe5253139b4f2074eb873f0.tar.bz2
abuild-8d272af1742564fcdfe5253139b4f2074eb873f0.tar.xz
abuild: Fix indention of the snapshot() function
The snapshot function was indented with spaces while the rest of the code is indented with tabs.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in88
1 files changed, 44 insertions, 44 deletions
diff --git a/abuild.in b/abuild.in
index 00befde..e9e2b70 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2024,52 +2024,52 @@ all() {
# Base version defaults to 0 except if specified by $verbase.
snapshot() {
- # check if we setup vars correctly
- [ -z "$disturl" ] && warning "Missing disturl in APKBUILD, auto uploading disabled."
- [ -z "$svnurl" ] && [ -z "$giturl" ] && die "Missding repository url in APKBUILD!"
- [ -n "$svnurl" ] && [ -n "$giturl" ] && die "You can only use a single repository!"
- local _date=$(date +%Y%m%d)
+ # check if we setup vars correctly
+ [ -z "$disturl" ] && warning "Missing disturl in APKBUILD, auto uploading disabled."
+ [ -z "$svnurl" ] && [ -z "$giturl" ] && die "Missding repository url in APKBUILD!"
+ [ -n "$svnurl" ] && [ -n "$giturl" ] && die "You can only use a single repository!"
+ local _date=$(date +%Y%m%d)
local _format="tar.gz"
- # remove any repositories left in srcdir
- abuild clean
- mkdir -p "$srcdir" && cd "$srcdir"
- # clone git repo and archive
- if [ -n "$giturl" ]; then
- local _version=${verbase:-0}_git${_date}
- command -v git >/dev/null || \
- die "Missing git! Install git to support git clone."
- [ -z "$reporev" ] && local _rev="HEAD" && local _depth="--depth=1"
- msg "Creating git snapshot: $pkgname-$_version"
- git clone $_depth --bare $giturl $pkgname-$_version || return 1
- git --git-dir $pkgname-$_version archive \
+ # remove any repositories left in srcdir
+ abuild clean
+ mkdir -p "$srcdir" && cd "$srcdir"
+ # clone git repo and archive
+ if [ -n "$giturl" ]; then
+ local _version=${verbase:-0}_git${_date}
+ command -v git >/dev/null || \
+ die "Missing git! Install git to support git clone."
+ [ -z "$reporev" ] && local _rev="HEAD" && local _depth="--depth=1"
+ msg "Creating git snapshot: $pkgname-$_version"
+ git clone $_depth --bare $giturl $pkgname-$_version || return 1
+ git --git-dir $pkgname-$_version archive \
--format=$_format \
- -o $pkgname-$_version.$_format \
- --prefix=$pkgname-$_version/ $_rev \
- || return 1
- fi
- # export svn repo and archive
- if [ -n "$svnurl" ]; then
- local _version=${verbase:-0}_svn${_date}
- command -v svn >/dev/null || \
- die "Missing svn! Install subverion to support svn export."
- [ -n "$reporev" ] && local _rev="-r $reporev"
- msg "Creating svn snapshot: $pkgname-$_version"
- svn co $_rev $svnurl $pkgname-$_version || return 1
- tar zcf $pkgname-$_version.$_format $pkgname-$_version || return 1
- fi
- # upload to defined distfiles url
- if [ -n "$disturl" ]; then
- command -v rsync >/dev/null || \
- die "Missing rsync! Install rsync to enable automatic uploads."
- msg "Uploading to $disturl"
- rsync --progress -La $pkgname-$_version.$_format \
- $disturl || return 1
- cd "$startdir"
- # set the pkgver to current date and update checksum
- sed -i -e "s/^pkgver=.*/pkgver=${_version}/" \
- APKBUILD || return 1
- abuild checksum
- fi
+ -o $pkgname-$_version.$_format \
+ --prefix=$pkgname-$_version/ $_rev \
+ || return 1
+ fi
+ # export svn repo and archive
+ if [ -n "$svnurl" ]; then
+ local _version=${verbase:-0}_svn${_date}
+ command -v svn >/dev/null || \
+ die "Missing svn! Install subverion to support svn export."
+ [ -n "$reporev" ] && local _rev="-r $reporev"
+ msg "Creating svn snapshot: $pkgname-$_version"
+ svn co $_rev $svnurl $pkgname-$_version || return 1
+ tar zcf $pkgname-$_version.$_format $pkgname-$_version || return 1
+ fi
+ # upload to defined distfiles url
+ if [ -n "$disturl" ]; then
+ command -v rsync >/dev/null || \
+ die "Missing rsync! Install rsync to enable automatic uploads."
+ msg "Uploading to $disturl"
+ rsync --progress -La $pkgname-$_version.$_format \
+ $disturl || return 1
+ cd "$startdir"
+ # set the pkgver to current date and update checksum
+ sed -i -e "s/^pkgver=.*/pkgver=${_version}/" \
+ APKBUILD || return 1
+ abuild checksum
+ fi
}
usage() {