From f8eeebacaa1df7c7e243d4e5f77eacfdb9f42711 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Fri, 16 Mar 2001 09:02:00 +0000 Subject: [PATCH] Add ruby-shell, a Ruby library to run commands and control jobs like a shell. Pipes and redirections work just as expected: sh = Shell.cd("/foo") sh.cat("bar") | sh.tee("baz") > "baa" # or sh.transact do cat("bar") | tee("baz") > "baa" end --- shells/Makefile | 1 + shells/ruby-shell/Makefile | 36 +++++++++++++++++++++++++++++++++++ shells/ruby-shell/distinfo | 1 + shells/ruby-shell/pkg-comment | 1 + shells/ruby-shell/pkg-descr | 13 +++++++++++++ shells/ruby-shell/pkg-plist | 11 +++++++++++ 6 files changed, 63 insertions(+) create mode 100644 shells/ruby-shell/Makefile create mode 100644 shells/ruby-shell/distinfo create mode 100644 shells/ruby-shell/pkg-comment create mode 100644 shells/ruby-shell/pkg-descr create mode 100644 shells/ruby-shell/pkg-plist diff --git a/shells/Makefile b/shells/Makefile index a9eeb1f2fd97..acdd23eb6f55 100644 --- a/shells/Makefile +++ b/shells/Makefile @@ -14,6 +14,7 @@ SUBDIR += pdksh SUBDIR += perlsh SUBDIR += rc + SUBDIR += ruby-shell SUBDIR += sash SUBDIR += scsh SUBDIR += tcsh diff --git a/shells/ruby-shell/Makefile b/shells/ruby-shell/Makefile new file mode 100644 index 000000000000..7cbbe1312118 --- /dev/null +++ b/shells/ruby-shell/Makefile @@ -0,0 +1,36 @@ +# New ports collection makefile for: shell.rb +# Date created: 16 March 2001 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= shell +PORTVERSION= 0.5.6 +CATEGORIES= shells ruby +MASTER_SITES= ${MASTER_SITE_RUBY} +MASTER_SITE_SUBDIR= contrib +PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} +EXTRACT_SUFX= .tgz +DIST_SUBDIR= ruby + +MAINTAINER= knu@FreeBSD.org + +USE_RUBY= yes + +NO_BUILD= yes + +DOCS_JA= doc/shell.doc + +do-install: + ${MKDIR} ${RUBY_SITELIBDIR}/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/shell.rb ${RUBY_SITELIBDIR}/ + ${INSTALL_DATA} ${WRKSRC}/shell/* ${RUBY_SITELIBDIR}/${PORTNAME}/ +.if !defined(NOPORTDOCS) + ${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}/ja +.for f in ${DOCS_JA} + ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/ja/ +.endfor +.endif + +.include diff --git a/shells/ruby-shell/distinfo b/shells/ruby-shell/distinfo new file mode 100644 index 000000000000..f3a8afd6300f --- /dev/null +++ b/shells/ruby-shell/distinfo @@ -0,0 +1 @@ +MD5 (ruby/shell-0.5.6.tgz) = eab033b97ee6fbcfd15fff23715adbcc diff --git a/shells/ruby-shell/pkg-comment b/shells/ruby-shell/pkg-comment new file mode 100644 index 000000000000..95cce9975e15 --- /dev/null +++ b/shells/ruby-shell/pkg-comment @@ -0,0 +1 @@ +A Ruby library to run commands and control jobs like a shell diff --git a/shells/ruby-shell/pkg-descr b/shells/ruby-shell/pkg-descr new file mode 100644 index 000000000000..78592a7004bb --- /dev/null +++ b/shells/ruby-shell/pkg-descr @@ -0,0 +1,13 @@ +shell.rb is a Ruby library to run commands and control jobs like a +shell. Pipes and redirections work just as expected: + + sh = Shell.cd("/foo") + + sh.cat("bar") | sh.tee("baz") > "baa" + # or + sh.transact do + cat("bar") | tee("baz") > "baa" + end + +Author: Keiju Ishitsuka +WWW: http://www.ruby-lang.org/en/raa-list.rhtml?name=Shell diff --git a/shells/ruby-shell/pkg-plist b/shells/ruby-shell/pkg-plist new file mode 100644 index 000000000000..6264ecdb320d --- /dev/null +++ b/shells/ruby-shell/pkg-plist @@ -0,0 +1,11 @@ +%%RUBY_SITELIBDIR%%/shell.rb +%%RUBY_SITELIBDIR%%/shell/builtin-command.rb +%%RUBY_SITELIBDIR%%/shell/command-processor.rb +%%RUBY_SITELIBDIR%%/shell/error.rb +%%RUBY_SITELIBDIR%%/shell/filter.rb +%%RUBY_SITELIBDIR%%/shell/process-controller.rb +%%RUBY_SITELIBDIR%%/shell/system-command.rb +@dirrm %%RUBY_SITELIBDIR%%/shell +%%PORTDOCS%%%%RUBY_DOCDIR%%/shell/ja/shell.doc +%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/shell/ja +%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/shell