Small shell script to install and update Gauche Scheme easily
Switch branches/tags
Nothing to show
Clone or download
shirok Merge pull request #6 from Hamayama/fix_mingw
Fix installation error on MinGW when Gauche is not found
Latest commit 4a1a4f1 May 20, 2018


NAME - Ensure Gauche availability

SYNOPSIS [--system|--home|--current|--prefix PREFIX|--update]
                  [--auto][--version VERSION][--check-only][--force][--list]


    The `` script is a convenient way to ensure Gauche installed
    on the running platform.  By default, it checks if the desired version
    of Gauche is already installed, and if not, download the tarball and
    install it.

    It can also be used with distributing Gauche applications.
    In the application's build or installation script, you can call, so that the user won't need to install Gauche separately.

    If --check-only option is given, the script only checks if Gauche
    has already installed but does not attempt to download and install.

    The installation location can be specified by --prefix, --system,
    --home, --update or --current option.  These options are mutually 
    exclusive.  When none of these options is given, prompts
    the user to enter the location.  (The location must be specified
    with --auto option.)

    If --force options is given, the script always downloads and installs
    Gauche, regardless of whether Gauche is already installed or not.

    By default, installed Gauche is searched in $PATH as well as the
    specified location.  So, for example, if Gauche is installed under 
    /usr and ' --home' is run, and if it finds /usr/bin/gosh
    and the version requirement is satisfied, it won't attempt to install
    Gauche unless --force option is given.  If you want to ensure that
    desired Gauche is always installed under specified location, use
    --fixed-path option.

    If you don't have the write permission in the install destination, asks you if it can use sudo to install Gauche.
    You can use --sudo option to omit its asking.


        When finds Gauche needs to be installed, it proceed
        to download and install without asking the user.  By default,
        the user is asked before download begins.

        detect Gauche and report result, but not to attempt download
        and install.

        install Gauche under the current directory (e.g. ./bin/gosh for
        executable, ./{lib,share}/gauche-x.x/ for libraries, etc.)
        Equivalent to --prefix `pwd`.

        detect Gauche only under prefix (specified by --prefix, --system,
        --home or --current option).  By default, also checks
        under directories in PATH.

        regardless of the result of version check, always download and
        install the specified version of Gauche.

        install Gauche under the user's home directory (e.g. $HOME/bin/gosh
        for executable, $HOME/{lib,share}/gauche-x.x/ for libraries, etc.)
        Equivalent to --preifx $HOME.

        Do not remove build directory after installation.  Useful for
        troubleshooting.   Build directory is created under the
        current directory with a name 'build-YYYYMMDD_hhmmss.xxxxxx'
        where 'YYYYMMDD_hhmmss' is the timestamp and 'xxxxxx' is a random

        show valid Gauche versions for --version option and exit.  No
        other operations are performed.

    --prefix PREFIX
        install Gauche under PREFIX.  The gosh executable is in PREFIX/bin,
        binary libraries are in PREFIX/{lib,share}, etc.

        invoke 'make install' via sudo.  Needed if you want to install
        Gauche where you don't have write permissions.  You may be asked
        to type your password by sudo.
        install Gauche under system directory.
        Equivalent to --prefix /usr.

        install Gauche under the same directory as the currently installed
        one.  If no previous installation is found, prompts the
        user to type the directory.

    --version VERSION
        specify the desired version of Gauche.  VERSION can be a version
        string (e.g. `0.9.5'), or either `latest' or `snapshot'.  The word
        `latest' picks the latest release.  The word `snapshot' picks the
        newest snapshot tarball if there's any newer than the latest
        release, or the latest release otherwise.
        By default, `latest' is assumed.


    1. The simplest way to install the latest release.  The user will be
    asked install location.  If there's already another Gauche installed,
    its prefix is presented as the default install location.


    2. You want to have the latest release of Gauche.  If the system
    already has it, you can use it.  Otherwise, install under your home

       $ --home

    3. You want to update installed Gauche to the latest snapshot.  The
    existing Gauche is installed in the system directory so you need to
    use sudo to install.

       $ --update --sudo --version snapshot

    4. You distribute a Gauche application, and always want to use Gauche 
    0.9.4 under application-specific directory.  You can run
    during the build or installation process of your application as follows:

       $ --version 0.9.4 --prefix /app/dir/gauche \
                       --fixed-path --auto

    The --fixed-path option ignores other Gauches installed under PATH
    but only checks /app/dir/gauche.  If there's already 0.9.4 or later
    Gauche under that directory, you'll use it.  Otherwise that version
    is downloaded and installed there.