From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GYJlg-0003gM-4m for garchives@archives.gentoo.org; Fri, 13 Oct 2006 09:55:53 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9D9rkj4005847; Fri, 13 Oct 2006 09:53:46 GMT Received: from web53312.mail.yahoo.com (web53312.mail.yahoo.com [206.190.49.102]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9D9pUZ9003867 for ; Fri, 13 Oct 2006 09:51:32 GMT Received: (qmail 63655 invoked by uid 60001); 13 Oct 2006 09:51:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XwFpK60SB9gi9hpK4Fz7jXeh9VrknZCnpD3R//GY2ZHZYR7Hwho/6j2S7vdPylV+5ftcx4aUCxr4fwQmR0yl6DDA2swoF86HL0OdpXMsY53BwH0i/FUGEJgcdo4xv22pYN71YfKMmwWos8+AKBIdjFdKMhIrj90deWE/GB9PyPw= ; Message-ID: <20061013095129.63653.qmail@web53312.mail.yahoo.com> Received: from [194.51.20.124] by web53312.mail.yahoo.com via HTTP; Fri, 13 Oct 2006 02:51:29 PDT Date: Fri, 13 Oct 2006 02:51:29 -0700 (PDT) From: go moko Subject: Re: [gentoo-user] {OT} dvdrip permissions error, alternative? To: gentoo-user@lists.gentoo.org In-Reply-To: <200610131023.23169.bo.andresen@zlin.dk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id k9D9rkjW005847 X-Archives-Salt: d876a2df-6c12-4c26-a6c5-33fada9e018e X-Archives-Hash: dad9b7ef42ef8f6e4fc932a3bbbfce0b --- Bo =D8rsted Andresen wrote: > It's quite common is bash scripts to define a > function named die: >=20 > die() { > echo "$@" > exit 1 > } Or, with use of a specific return code: die() { RT=3D$1 shift echo "$@" exit $RT } and call it either with the error code of the previous program: > vobcopy -m || die $? "vobcopy failed" or your own return code > vobcopy -m || die 58 "vobcopy failed" Just a point a detail, if it can be useful... G. Moko __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around=20 http://mail.yahoo.com=20 --=20 gentoo-user@gentoo.org mailing list