Gentoo Archives: gentoo-dev

From: "Amadeusz Żołnowski" <aidecoe@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [RFC] obs eclasses
Date: Tue, 13 Sep 2011 11:25:37
Message-Id: 1315912613-sup-7918@raeviah
In Reply to: [gentoo-dev] [RFC] obs eclasses by Michal Hrusecky
Hi,


Excerpts from Michal Hrusecky's message of 2011-09-13 13:11:28 +0200:
> Comments and improvements are welcome.
Just some minor remarks:
> [[ -z ${OPENSUSE_RELEASE} ]] || OBS_PROJECT="openSUSE:${OPENSUSE_RELEASE}" > [[ -n ${OBS_PROJECT} ]] || die "OBS_PROJECT not set!" > [[ -n ${OBS_PACKAGE} ]] || die "OBS_PACKAGE not set!"
You don't need -n/-z with [[. [[ $var ]] == [[ -n $var ]] [[ ! $var ]] == [[ -z $var ]] So: [[ ${OPENSUSE_RELEASE} ]] && OBS_PROJECT="openSUSE:${OPENSUSE_RELEASE}" [[ ${OBS_PROJECT} ]] || die "OBS_PROJECT not set!" [[ ${OBS_PACKAGE} ]] || die "OBS_PACKAGE not set!"
> obs-service_src_install() { > debug-print-function ${FUNCNAME} "$@" > debug-print "Installing service \"${OBS_SERVICE_NAME}\"" > exeinto /usr/lib/obs/service > doexe ${DISTDIR}/${OBS_SERVICE_NAME} > insinto /usr/lib/obs/service > doins ${DISTDIR}/${OBS_SERVICE_NAME}.service > if [[ -n ${ADDITIONAL_FILES} ]]; then > debug-print "Installing following additional files:" > debug-print " ${ADDITIONAL_FILES}" > exeinto /usr/lib/obs/service/${OBS_SERVICE_NAME}.files > for i in ${ADDITIONAL_FILES}; do > doexe ${DISTDIR}/$i
"" just in case.
> done > fi > }
-- Amadeusz Żołnowski PGP key fpr: C700 CEDE 0C18 212E 49DA 4653 F013 4531 E1DB FAB5

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [RFC] obs eclasses Michal Hrusecky <miska@g.o>
Re: [gentoo-dev] [RFC] obs eclasses Joshua Kinard <kumba@g.o>