Mail archive
alpine-aports

[alpine-aports] [PATCH 3/3] abuild: whitespace cleanup?

From: Muh Muhten <muh.muhten_at_gmail.com>
Date: Mon, 1 Feb 2016 17:32:29 -0500

not sure what happened there but it was jarringly inconsistent
---
 abuild.in | 88 +++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/abuild.in b/abuild.in
index 1b94750..2920df6 100644
--- a/abuild.in
+++ b/abuild.in
_at_@ -2030,52 +2030,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() {
-- 
2.5.4 (Apple Git-61)
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Feb 01 2016 - 17:32:29 GMT