Expose all bournish commands as external command.
* bin/builtin.in: New file. * bin/tar.in: Remove. * configure: Generate bin/<builtin> for all bournish-commands. * build-aux/build-guile.sh: Compile them. * .gitignore: Ignore them.
This commit is contained in:
parent
70d28ea480
commit
904eecbb2c
|
@ -1,7 +1,15 @@
|
||||||
*.go
|
*.go
|
||||||
*~
|
*~
|
||||||
|
/bin/cat
|
||||||
|
/bin/cp
|
||||||
|
/bin/find
|
||||||
/bin/gash
|
/bin/gash
|
||||||
|
/bin/grep
|
||||||
|
/bin/ls
|
||||||
|
/bin/reboot
|
||||||
/bin/tar
|
/bin/tar
|
||||||
|
/bin/wc
|
||||||
|
/bin/which
|
||||||
/.config.make
|
/.config.make
|
||||||
/doc/version.texi
|
/doc/version.texi
|
||||||
/gash/config.scm
|
/gash/config.scm
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
;;; along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define (main args)
|
(define (main args)
|
||||||
((@ (gash gash) main) (cons* (car (command-line)) "--" "tar" (cdr (command-line)))))
|
((@ (gash gash) main) (cons* (car (command-line)) "--" "@builtin@" (cdr (command-line)))))
|
6
bin/gash
6
bin/gash
|
@ -1,6 +0,0 @@
|
||||||
#! /home/janneke/.guix-profile/bin/guile \
|
|
||||||
--no-auto-compile -e main -L "/usr/local/share/guile/site/" -C "/usr/local/lib/guile//site-ccache" -L . -C . -s
|
|
||||||
!#
|
|
||||||
(define (main args)
|
|
||||||
(setenv "SHELL" ((compose canonicalize-path car command-line)))
|
|
||||||
((@ (gash gash) main) (command-line)))
|
|
|
@ -51,7 +51,6 @@ gash/job.scm
|
||||||
gash/peg.scm
|
gash/peg.scm
|
||||||
gash/pipe.scm
|
gash/pipe.scm
|
||||||
gash/script.scm
|
gash/script.scm
|
||||||
gash/tar.scm
|
|
||||||
gash/ustar.scm
|
gash/ustar.scm
|
||||||
gash/util.scm
|
gash/util.scm
|
||||||
"
|
"
|
||||||
|
@ -68,8 +67,16 @@ for i in $SCM_FILES; do
|
||||||
done
|
done
|
||||||
|
|
||||||
SCRIPTS="
|
SCRIPTS="
|
||||||
|
bin/cat
|
||||||
|
bin/cp
|
||||||
|
bin/find
|
||||||
bin/gash
|
bin/gash
|
||||||
|
bin/grep
|
||||||
|
bin/ls
|
||||||
|
bin/reboot
|
||||||
bin/tar
|
bin/tar
|
||||||
|
bin/wc
|
||||||
|
bin/which
|
||||||
"
|
"
|
||||||
|
|
||||||
for i in $SCRIPTS; do
|
for i in $SCRIPTS; do
|
||||||
|
|
|
@ -34,12 +34,26 @@ sed \
|
||||||
-e s,@GUILE_SITE_CCACHE_DIR@,$GUILE_SITE_CCACHE_DIR,\
|
-e s,@GUILE_SITE_CCACHE_DIR@,$GUILE_SITE_CCACHE_DIR,\
|
||||||
bin/gash.in > bin/gash
|
bin/gash.in > bin/gash
|
||||||
chmod +x bin/gash
|
chmod +x bin/gash
|
||||||
sed \
|
BUILTINS="
|
||||||
-e s,@GUILE@,$GUILE,\
|
cat
|
||||||
-e s,@GUILE_SITE_DIR@,$GUILE_SITE_DIR,\
|
cp
|
||||||
-e s,@GUILE_SITE_CCACHE_DIR@,$GUILE_SITE_CCACHE_DIR,\
|
find
|
||||||
bin/tar.in > bin/tar
|
grep
|
||||||
chmod +x bin/tar
|
ls
|
||||||
|
reboot
|
||||||
|
tar
|
||||||
|
wc
|
||||||
|
which
|
||||||
|
"
|
||||||
|
for builtin in $BUILTINS; do
|
||||||
|
sed \
|
||||||
|
-e s,@GUILE@,$GUILE,\
|
||||||
|
-e s,@GUILE_SITE_DIR@,$GUILE_SITE_DIR,\
|
||||||
|
-e s,@GUILE_SITE_CCACHE_DIR@,$GUILE_SITE_CCACHE_DIR,\
|
||||||
|
-e s,@builtin@,$builtin,\
|
||||||
|
bin/builtin.in > bin/$builtin
|
||||||
|
chmod +x bin/$builtin
|
||||||
|
done
|
||||||
cat > .config.make <<EOF
|
cat > .config.make <<EOF
|
||||||
BASH=$BASH
|
BASH=$BASH
|
||||||
GUILE=$GUILE
|
GUILE=$GUILE
|
||||||
|
|
Loading…
Reference in New Issue