Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346#!/bin/sh1#############################################################################2##3#A xgap XGAP source Frank Celler4##5##6#Y Copyright (C) 1998, Lehrstuhl D fuer Mathematik, RWTH, Aachen, Germany7##8910#############################################################################11##12## xgap.sh GAP Max Neunhoeffer13##14## This is a shell script for the UNIX operating system that starts XGAP.15## This is the place where you make all the necessary customizations.16## Then copy this file to a directory in your search path, e.g., '~/bin'.17## If you later move GAP to another location you must only change this file.18##1920#############################################################################21##22## GAP_DIR . . . . . . . . . . . . . . . . . . . . directory where GAP lives23##24## Set 'GAP_DIR' to the name of the directory where you have installed GAP,25## i.e., the directory with the subdirectories 'lib', 'grp', 'doc', etc.26## The default is '/home/user/gap4r8', which is the root directory if you install27## XGAP in the default `pkg' directory.28## If you install XGAP in a private directory you have to change this.29##30if [ "x$GAP_DIR" = "x" ]; then31GAP_DIR="/home/user/gap4r8"32fi333435#############################################################################36##37## GAP_PRG . . . . . . . . . . . . . . . . . name of the executable program38##39## Set 'GAP_PRG' to the name of the executable program of the GAP kernel.40## The default is '`hostname'/gap'. You can either change this to41## '<target>/gap' where <target> is the target you have selected during the42## compilation or create a symbolic link from <target> to '`hostname`' in43## the 'bin' directory.44##45if [ "x$GAP_PRG" = "x" ]; then46GAP_PRG=x86_64-pc-linux-gnu-gcc-default64/gap47fi484950#############################################################################51##52## XGAP_PRG . . . . . . . . . . . . . . . . . name of the executable program53##54## Set 'XGAP_PRG' to the name of the executable program of the XGAP kernel.55## The default is '`hostname'/gap'. You can either change this to56## '<target>/gap' where <target> is the target you have selected during the57## compilation or create a symbolic link from <target> to '`hostname`' in58## the 'bin' directory.59##60if [ "x$XGAP_PRG" = "x" ]; then61XGAP_PRG=x86_64-unknown-linux-gnu-gcc/xgap62fi636465#############################################################################66##67## DAEMON . . . . . . . . . . . . . . flag, whether xgap goes to background68##69## Set 'DAEMON' to "NO" if you don't want the usual behaviour, that xgap70## goes to the background directly after starting up.71##72DAEMON="YES"7374#############################################################################75##76## VERBOSE . . . . . . . . . . . . . . flag, whether lots of messages appear77##78## Set 'VERBOSE' to "YES", if you want exact information about the options79## with which the xgap executable is executed. Mainly used for debugging80## purposes.81##82VERBOSE="NO"838485#############################################################################86##87## STOP EDITING HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!88##89## Unless you know what you are doing! This should not be necessary if you90## installed GAP and XGAP in the standard way as a share package within the91## GAP directory.92## If you really want to edit the variables below, insert additional93## definitions above, they will *not* be overwritten!94##95#############################################################################9697#############################################################################98##99#F options . . . . . . . . . . . . . . . . . parse the command line options100##101## GAP accepts the following options:102##103## -b toggle banner supression104## -q toggle quiet mode105## -e toggle quitting on <ctr>-D106## -f force line editing107## -n disable line editing108## -x <num> set line width109## -y <num> set number of lines110##111## -g toggle GASMAN messages112## -m <mem> set the initial workspace size113## -o <mem> set the maximal workspace size114## -c <mem> set the cache size value115## -a <mem> set amount to pre-malloc-ate116## postfix 'k' = *1024, 'm' = *1024*1024117## -l <paths> set the GAP root paths118## -r toggle reading of the '.gaprc' file119## -D toggle debuging the loading of library files120## -B <name> current architecture121## -M toggle loading of compiled modules122## -N toggle check for completion files123## -X toggle CRC for comp. files while reading124## -Y toggle CRC for comp. files while completing125## -i <file> change the name of the init file126##127## -L <file> restore a saved workspace128##129##130## XGAP accepts the following options:131##132## -display <dis>, --display <dis>133## set the display134##135## -geometry <geo>, --geometry <geo>136## set the geometry137##138## -normal <font>, --normal <font>139## set the normal font140##141## -huge <font>, --huge <font>142## set the huge font143##144## -large <font>, --large <font>145## set the large font146##147## -small <font>, --small <font>148## set the small font149##150## -tiny <font>, --tiny <font>151## set the tiny font152##153##154## XGAP accepts the following debug options:155##156## --debug <num>157## enter debug mode (XGAP must be compiled with DEBUG_ON)158##159## -G <exec>, --gap-exec <exec>, --gap-prg <exec>160## use another GAP executable161##162## -X <exec>, --xgap-exec <exec>, --xgap-prg <exec>163## use another XGAP executable164##165##166## this scripts accepts the following debug options:167##168## -V, --verbose169## be verbose170##171## --stay172## don't put XGAP into the backgroup173##174175## we parse all options:176177XP=""178GP=""179180while [ $# -gt 0 ]; do181case $1 in182183# GAP options184-b|-q|-e|-f|-n|-g|-r|-D|-M|-N|-X|-Y) GP="$GP $1" ;;185-x|-y|-o|-c|-a|-B|-i|-L) GP="$GP $1 $2"; shift ;;186-l|--gap-lib) GAP_DIR="$2"; shift ;;187188# XGAP options189-display|--display) XP="$XP -display $2"; shift ;;190-geometry|--geometry) XP="$XP -geometry $2"; shift ;;191-huge|--huge*) XP="$XP -huge $2"; shift ;;192-large|--large*) XP="$XP -large $2"; shift ;;193-normal|--normal*) XP="$XP -normal $2"; shift ;;194-small|--small*) XP="$XP -small $2"; shift ;;195-tiny|--tiny*) XP="$XP -tiny $2"; shift ;;196197# DEBUG options198--debug) XP="$XP -D $2"; shift ;;199-G|--gap-exec|--gap-prg) GAP_PRG="$2"; shift ;;200-X|--xgap-exec|--xgap-prg) XGAP_PRG="$2"; shift ;;201202# script options203-V|--verbose) VERBOSE="YES" ;;204--stay) DAEMON="NO" ;;205206# everything else is passed to GAP:207*) GP="$GP $1" ;;208209esac210shift211done212213214#############################################################################215##216#V DISPLAY . . . . . . . . . . . . . . . . . . display variable must be set217##218if [ "x$DISPLAY" = "x" ]; then219echo 'sorry: xgap is a program running under the X Window System, so'220echo 'you need a graphics display.'221echo 'you must either set $DISPLAY or use "-display HOST:0.0"'222echo 'where you replace HOST by the name of your machine.'223exit 1;224fi;225226227#############################################################################228##229##230XGAP=/home/user/gap4r8/pkg/xgap-4.26/bin/$XGAP_PRG231GAP=$GAP_DIR/bin/$GAP_PRG232233#############################################################################234##235#F verbose . . . . . . . . . . . . . . . . . . . . . print some information236##237if [ $VERBOSE = "YES" ]; then238echo239echo "XGAP executable: $XGAP"240echo "GAP path: $GAP_DIR"241echo "GAP executable: $GAP"242echo "GAP library arg: $LIBARG"243echo "Display: $DISPLAY"244echo "XGAP parameters: $XP"245echo "GAP parameters: $GP"246echo247fi248249250#############################################################################251##252#F XGAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . start XGAP253##254255export TERM=dumb256257if [ $DAEMON = "YES" ]; then258$XGAP -G $GAP $XP -- -l "$GAP_DIR" $GP &259else260$XGAP -G $GAP $XP -- -l "$GAP_DIR" $GP261fi262263exit 0264265266