X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id D1D5FDC0060 for ; Tue, 2 Feb 2016 02:07:37 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 092ACDC0017 for ; Tue, 2 Feb 2016 02:07:35 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id r129so210702wmr.0 for ; Mon, 01 Feb 2016 18:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ChWhp0WPqWAtGcn8oOeAmtxx8hRcIPbmdX7ovO2eJ9g=; b=Vg5mddu/ELKd8tuIy5TdBd5RcyEJeSRBMHMIO48H3gt+Gl+yr4tnBtTv7p4SYRNiro xLrAFx76y/pDPkfrkgxJdmU2zwbiekG1mJJmLX4oO4jDlzQmn31J/cvB+cTPGY1j//Vm Vajo6XPxBKZeJrchC8p12JVK5GZp+XutySkg9/osik9V7x7U2Huv8/rrUrvZx5y/QvNE s56mhDWMD5g1GrYMWEtXeAQaBl0gWR+tBlw7cKbyywawKG8wye4vxeQWzMUV4WyPJCXr KEAmsbRc5QsaOIt+ciB8GTKVqPitsVLk38i3KIcezbWiJlGXfYD1uJyJe99lIHKlciKP /gjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ChWhp0WPqWAtGcn8oOeAmtxx8hRcIPbmdX7ovO2eJ9g=; b=LuUCuZqC2Kh71qBis45LVYo4R0cS7sA14cmjVegWOsufDtCJ+q4eXX4ySyOsjPcX6S C8hbXDBbdjIKuc9E77BlPVxdDLrLNP0IWV+lfjccP1FxIv8AU4I2ME4Grff+vVwaOrkd ZhQPQ5slVplZ93yEB7aN5wNzGnx4cpbWuVh00o0G0BK69+wutvTQITxFsViYkY8fJJM2 CUhFkNSNT2Xb8lJbb34gOGHTUGvVi4qx+bw1dUwnziUwZSnLdBzdrYONTiUOl9wKGjmf HpiOlwT3No4Iev27QfUNDbxmVZnrZNHgmrST0sES9p9LgEypcEbypvQ6sgr3crgCw4T5 vAFw== X-Gm-Message-State: AG10YOQrBD4ba5Sw/sxl/Vl3alfR8dVuAph8sT4Jtyfkk0rKEPRQP0OB+NuTQu3Gbojyag== X-Received: by 10.194.21.135 with SMTP id v7mr24897405wje.131.1454365967897; Mon, 01 Feb 2016 14:32:47 -0800 (PST) Received: from localhost.localdomain (manaka.greata.uk. [195.154.83.235]) by smtp.gmail.com with ESMTPSA id r10sm31142750wjz.24.2016.02.01.14.32.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 14:32:47 -0800 (PST) From: Muh Muhten To: alpine-aports@lists.alpinelinux.org Cc: Muh Muhten Subject: [alpine-aports] [PATCH 3/3] abuild: whitespace cleanup? Date: Mon, 1 Feb 2016 17:32:29 -0500 Message-Id: <1454365949-60951-3-git-send-email-muh.muhten@gmail.com> X-Mailer: git-send-email 2.5.4 (Apple Git-61) In-Reply-To: <1454365949-60951-1-git-send-email-muh.muhten@gmail.com> References: <1454365949-60951-1-git-send-email-muh.muhten@gmail.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: 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 @@ -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@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---