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#W gapd.sh The SCSCP package Alexander Konovalov4#W Steve Linton5##6## gapscscp.sh [-h host] [-a] [-l] [-u] [-p port] [-t]7##8## The following options may be used to overwrite the default method to9## specify the hostname to run GAP SCSCP server, stated in scscp/config.g :10##11## 1) if '-h host' is specified, then the server will be started at 'host'.12## 'host' may be given as machine name with or without domain or even as13## 'localhost', though we have -l option for that purpose14##15## 2) if '-a' is specified, then the output of the call to 'hostname' will16## be used as the SCSCP server address17##18## 3) if '-l' is specified, then the server will be started at localhost19## and will not accept any incoming connections from the outside20##21## 4) if '-u' is specified, the server will be started in a "universal"22## mode and will accept all incoming connections23##24## The options 1-4 above are incompatible, so in case several of them will25## be given, only the option with the biggest number will be used26##27## If none of the options 1-4 above is stated, the hostname for the server28## will be taken from the scscp/config.g file29##30## Additionally, you may use the following options:31##32## 5) if '-p port' is specified, this will overwrite the default port for33## the SCSCP server given in scscp/config.g34##35## 6) if '-t' is specified than the output will be redirected to a36## temporary file, which name will be displayed on screen during37## startup. Otherwise, by default it will be redirected to /dev/null38##39##40###########################################################################41##42## PART 1. MODIFY PATHS IF NEEDED43##44###########################################################################45##46## Define the local call of GAP and call options, if necessary, for47## example, memory usage, start with the workspace etc. The path may be48## relative (to start from this directory) or absolute.49##50GAP="../../bin/gap.sh -b -r"51##52###########################################################################53##54## Define the configuration file for the SCSCP server. Note that since GAP55## reads the configuration file immediately before starting SCSCP server,56## you may redefine in it all variables that were set to their default57## values in scscp/config.g and scscp/configpar.g files (explicitly or58## reading your appropriately modified private copies of that files).59## The path may be relative (to start from this directory) or absolute.60##61SCSCP_CONFIG="example/myserver.g"62##63##64###########################################################################6566###########################################################################67##68## PART 2. YOU NEED NOT TO MODIFY ANYTHING BELOW69##70###########################################################################71##72## Parse the arguments.73##74autohost="no"75localhost="no"76unimode="no"77use_temp_file="no"78host=";"79port=";"8081option="yes"82while [ $option = "yes" ]; do83option="no"84case $1 in8586-a) shift; option="yes"; autohost="yes";;8788-h) shift; option="yes"; host=":=\""$1"\";"; shift;;8990-l) shift; option="yes"; localhost="yes";;9192-u) shift; option="yes"; unimode="yes";;9394-p) shift; option="yes"; port=":="$1";"; shift;;9596-t) shift; option="yes"; use_temp_file="yes";;9798esac99done100101if [ $use_temp_file = "yes" ]; then102OUTFILE=`mktemp /tmp/gapscscp.XXXXXX`103else104OUTFILE="/dev/null"105fi;106107if [ $autohost = "yes" ]; then108host=":=Hostname();"109fi;110111if [ $localhost = "yes" ]; then112host=":=false;"113fi;114115if [ $unimode = "yes" ]; then116host=":=true;"117fi;118119echo "Starting SCSCP server with output to $OUTFILE"120121# The next line starts GAP SCSCP server.122# To redirect stderr to /dev/null as well,123# replace $OUTFILE 2>&1 & with $OUTFILE &124125echo 'LoadPackage("scscp");SetInfoLevel(InfoSCSCP,0);SCSCPserverAddress'$host'SCSCPserverPort'$port'Read("'$SCSCP_CONFIG'"); if SCSCPserverStatus=fail then QUIT_GAP(); fi;' | exec $GAP > $OUTFILE &126127###########################################################################128##129#E130##131132133