Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: installing executable functions
- X-seq: zsh-workers 27644
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: installing executable functions
- Date: Sat, 30 Jan 2010 08:35:03 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=PBwXvKdb3mPfsai8HgfnjaOmArA8r6czq3Nbz9/RK9o=; b=l526tU1JuFSgAWSqkASn0nLpYTsyBt5JvkMO6+FozG7TSsRZlwDjriGAKJKecW1S2e YeuCfYyUaxC0/fycotbAbiKRfMQjhA0OPg9WDkWtKwwXOHzwTKa4lSCvNgJloQZG0t18 OhvgQTNTZv/GfxI9h3B1ZwRaSs6TTcr7RHS30=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=pYVeF6WT1iMRpU8crNNqIA9+ZHDnYR/ctDpwIBdbwlEPiHuUYRr0VnIpXkc7X9w6n4 eVWqlFBywAwdrRPdToEztome/1DHANM6G74DH/BJYmoQ++hZfaIbbA3YWhTHZB3xPNJW 3H8B4DbnKzFAXAB4DDoHLGi6B0HJ7c5D1sLPI=
- In-reply-to: <100129163645.ZM9106@xxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <25809.1264802076@pws-pc> <100129163645.ZM9106@xxxxxxxxxxxxxxxxxxxxxx>
On Saturday 30 of January 2010 03:36:45 Bart Schaefer wrote:
> On Jan 29, 9:54pm, Peter Stephenson wrote:
> }
> } ("sed -ne '1p'" is in case there's some ghastliness where "head -1"
> is } broken as has occasionally been observed with "tail -1".)
> }
> } The biggest disadvantage here is this could make function
> installation } on some systems, notably Cygwin, even more
> interminable.
>
> Perhaps this would be faster?
>
> if test -n "`sed -ne 2q -e '/^#!/p' $sdir_top/$file`"; then
>
> } + if sed -ne '1p' $sdir_top/$file | grep '^#!' >/dev/null; then
Hmm ... to completely avoid fork?
read -r line < $sdir_top/$file
case "$line" in
'#!'* )
chmod +x $instdir/`echo $file | sed -e 's%^.*/%%'`
;;
esac
Attachment:
signature.asc
Description: This is a digitally signed message part.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author