Changeset 16132 in project


Ignore:
Timestamp:
10/05/09 04:20:05 (10 years ago)
Author:
felix winkelmann
Message:

reverted commits 16083, 16091 and 16115

Location:
chicken/trunk
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • chicken/trunk/distribution/manifest

    r16117 r16132  
    268268private-namespace.scm
    269269compiler-namespace.scm
    270 scripts/chicken-scheme
     270scripts/scheme
    271271scripts/tools.scm
    272272scripts/test-dist.sh
  • chicken/trunk/scripts/README

    r16091 r16132  
    55This directory contains a couple of things that might be useful:
    66
    7   chicken-scheme
     7  scheme
    88
    9     A wrapper bash(1) script that allows automatic compilation of Scheme
     9    A wrapper sh(1) script that allows automatic compilation of Scheme
    1010    scripts. If you precede a Scheme file with a header line like this
    1111
    12       #!/usr/bin/env chicken-scheme
     12      #!/usr/bin/env scheme
    1313
    14     then a compiled version of the code will be stored in
    15     $HOME/.chicken-scheme.cache and executed, instead of the original
    16     source file. The wrapper script will automatically detect changes to
    17     the file and recompile as necessary. If called with no arguments,
    18     "chicken-scheme" will simply start "csi".
     14    then a compiled version of the code will be stored in $HOME/.cache
     15    and executed, instead of the original source file.
    1916
    2017  tools.scm
  • chicken/trunk/scripts/chicken-scheme

    r16115 r16132  
    11#!/bin/bash
    2 ### usage: chicken-scheme [-h] [FILENAME]
     2### usage: chicken-scheme FILENAME
    33#
    44# variables:
    55#
    6 # CHICKEN_SCHEME_DEBUG
    7 # CHICKEN_SCHEME_HOOK
     6# CHICKEN_AUTOCOMPILE_DEBUG
    87
    98
    10 #XXX change these on installation:
    11 chickenprefix=${HOME}
    12 cscprogram=csc
    13 csiprogram=csi
    14 
    15 dbgoption=-S
    16 cache=${HOME}/.chicken-scheme.cache
     9dbgoption=
     10cache=$HOME/.chicken-scheme.cache
    1711uname=`uname`
    1812wd=`pwd`
    1913
    20 if test "$1" == "-h"; then
    21     echo "usage: chicken-scheme [-h] [FILENAME]"
    22     exit 0
     14if test -n "$CHICKEN_AUTOCOMPILE_DEBUG"; then
     15    set -x
     16    dbgoption="-v2"
    2317fi
    2418
    25 if test -n "$CHICKEN_SCHEME_DEBUG"; then
    26     set -x
    27     dbgoption="${dbgoption} -v2"
    28 fi
    29 
    30 if test $# == 0; then
    31     exec "${chickenprefix}/bin/${csiprogram}"
     19if test "$#" == 0; then
     20    exec csi
    3221else
    3322    prg="$1"
    3423fi
    3524
    36 if test "${uname}" = "Darwin"; then
    37     prgh=`md5 -q ${prg}`
     25if test $uname = "Darwin"; then
     26    prgh=`md5 -q $prg`
    3827else
    39     prgh=`md5sum ${prg} | sed -n -e 's/\([^[:space:]]*\).*/\1/p'`
     28    prgh=`md5sum $prg | sed -n -e 's/\([^[:space:]]*\).*/\1/p'`
    4029fi
    4130
    42 compile_log="${cache}/${prgh}.compile"
    43 
    44 if test \! -d "${cache}"; then
    45     mkdir -p "${cache}"
     31if test \! -d $cache; then
     32    mkdir -p $cache
    4633fi
    4734
    48 if test "${prg}" -nt "${cache}/${prgh}"; then
    49     if test -n "${CHICKEN_SCHEME_HOOK}"; then
    50         ${CHICKEN_SCHEME_HOOK} "${prg}" "${cache}/${prgh}"
    51     fi
    52     if "${chickenprefix}/bin/${cscprogram}" ${dbgoption} "${prg}" -o "${cache}/${prgh}" > "${compile_log}" 2>&1; then :
    53     else
    54         cat "${compile_log}"
    55         rm -f "${compile_log}"
    56         exit 1
    57     fi
     35if test "$prg" -nt "$cache/$prgh"; then
     36    csc $dbgoption "$prg" -o "$cache/$prgh"
    5837fi
    5938
    60 rm -f "${compile_log}"
    61 
    62 if test -x "${cache}/${prgh}"; then
     39if test -x "$cache/$prgh"; then
    6340    shift
    64     exec "${cache}/${prgh}" "$@"
     41    exec "$cache/$prgh" "$@"
    6542else
    66     echo "can not run ${prg}"
     43    echo "can not run $1"
    6744fi
Note: See TracChangeset for help on using the changeset viewer.