From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7534E138789 for ; Thu, 31 Jan 2013 05:20:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 238F321C029; Thu, 31 Jan 2013 05:20:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9CE9321C029 for ; Thu, 31 Jan 2013 05:20:25 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 871D633DC17 for ; Thu, 31 Jan 2013 05:20:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 085C7E4073 for ; Thu, 31 Jan 2013 05:20:22 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1359609576.ca8a7416caf76e03ca27371e520bf5d6356ccc2d.vapier@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit-dev commit in: src/ebump/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: src/ebump/ebump X-VCS-Directories: src/ebump/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: ca8a7416caf76e03ca27371e520bf5d6356ccc2d X-VCS-Branch: gentoolkit-dev Date: Thu, 31 Jan 2013 05:20:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b2512b1d-70bc-44e9-b506-a2e917b5e712 X-Archives-Hash: c7fa25b7fdc9eee1661b1167ac054d0c commit: ca8a7416caf76e03ca27371e520bf5d6356ccc2d Author: Mike Frysinger gentoo org> AuthorDate: Thu Jan 31 05:19:36 2013 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Jan 31 05:19:36 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=ca8a7416 ebump: fix POSIX shell code "==" -> "=" "$[...]" -> "$((...))" URL: https://bugs.gentoo.org/445144 Reported-by: Richard Yao gentoo.org> Signed-off-by: Mike Frysinger gentoo.org> --- src/ebump/ebump | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ebump/ebump b/src/ebump/ebump index 3592beb..47ffd86 100755 --- a/src/ebump/ebump +++ b/src/ebump/ebump @@ -89,7 +89,7 @@ splitname() { ;; name) name=$(echo ${2} | sed -r "s/(.*)-[0-9].*/\1/") - if [ ${name} == ${2} ] ; then + if [ ${name} = ${2} ] ; then if [ $(echo ${2} | grep "^[0-9].*") ] ; then # The filename starts with a version number, thus it has no # name @@ -104,14 +104,14 @@ splitname() { ;; revision) rev=$(echo ${2} | sed -r "s/.*-r([0-9][0-9]*)/\1/") - if [ ${rev} == ${2} ] ; then + if [ ${rev} = ${2} ] ; then rev=0 fi echo ${rev} ;; vernorev) ver=$(echo ${2} | sed -r "s/.*-([0-9].*)-r[0-9]+/\1/") - if [ ${ver} == ${2} ] ; then + if [ ${ver} = ${2} ] ; then ver=$(echo ${2} | sed -r "s/.*-([0-9].*)/\1/") fi echo ${ver} @@ -157,13 +157,13 @@ process_ebuild() { local PV=$(splitname version ${PF}) local rev=$(splitname revision ${PF}) local PV_norev=$(splitname vernorev ${PF}) - local newPF=${PN}-${PV_norev}-r$[rev+1] + local newPF=${PN}-${PV_norev}-r$((rev+1)) # echo $PF / $PN / $PV / $rev / $PV_norev / $newPF einfo "Bumped ${PF}.ebuild to ${newPF}.ebuild" - if [ "${vcs}" == "svn" ]; then + if [ "${vcs}" = "svn" ]; then svn cp ${PF}.ebuild ${newPF}.ebuild else cp ${PF}.ebuild ${newPF}.ebuild @@ -179,7 +179,7 @@ process_ebuild() { # # (Optional) Bump relevant files in files/ # - if [ "${opt_bump_auxfiles}" == "y" ] ; then + if [ "${opt_bump_auxfiles}" = "y" ] ; then # Gather list of auxiliary files in files/ that has a versioned # filename, where the version matches our current version. local bumplist="" @@ -205,9 +205,9 @@ process_ebuild() { # Special case for when we have no name part; filename # is just a version number if [ -z "${PN}" ] ; then - newbn=${PV_norev}-r$[rev+1] + newbn=${PV_norev}-r$((rev+1)) else - newbn=${PN}-${PV_norev}-r$[rev+1] + newbn=${PN}-${PV_norev}-r$((rev+1)) fi if [ -d ${dn}/${bn} ] ; then @@ -236,7 +236,7 @@ process_ebuild() { # # (Optional) Add VCS entry for all new files # - if [ "${opt_add_vcs}" == "y" ] ; then + if [ "${opt_add_vcs}" = "y" ] ; then # for x in ${addfiles} ; do # if [ -d ${x} ] ; then # find ${x} -exec ${vcs} add {} ';' @@ -253,19 +253,19 @@ process_ebuild() { # (Optional) Delete previous entry # # Could we use 'rm' instead of remove for all vcs? - if [ "${opt_delete_old}" == "y" ] ; then + if [ "${opt_delete_old}" = "y" ] ; then # for x in ${delfiles} ; do -# if [ "${vcs}" == "cvs" ]; then +# if [ "${vcs}" = "cvs" ]; then # ${vcs} remove -f ${x} -# elif [ "${vcs}" == "git" ]; then +# elif [ "${vcs}" = "git" ]; then # ${vcs} rm ${x} # else # ${vcs} remove ${x} # fi # done - if [ "${vcs}" == "cvs" ]; then + if [ "${vcs}" = "cvs" ]; then $vcs remove -f $delfiles - elif [ "${vcs}" == "git" ]; then + elif [ "${vcs}" = "git" ]; then $vcs rm $delfiles else $vcs remove $delfiles @@ -276,7 +276,7 @@ process_ebuild() { # # (Optional) Add ChangeLog entry # - if [ "${opt_add_changelog}" == "y" ] && [ "${opt_add_vcs}" == "y" ]; then + if [ "${opt_add_changelog}" = "y" ] && [ "${opt_add_vcs}" = "y" ]; then # FIXME: remove this warning in 2-3 releases if [ -n "${AUTHORNAME}" ] || [ -n "${AUTHOREMAIL}" ]; then echo "Warning: AUTHORNAME and AUTHOREMAIL is deprecated!" >&2