Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Move 'sage -app' back to src/bin/sage
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jun 21, 2020
1 parent 875940d commit 4a3d36e
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 117 deletions.
117 changes: 0 additions & 117 deletions build/bin/sage-site
Original file line number Diff line number Diff line change
Expand Up @@ -93,34 +93,6 @@ usage_advanced() {
echo " --buildsh [...] -- run a shell with Sage environment variables"
echo " as they are set while building Sage and its packages"
echo
echo "Running external programs, continued:"
echo
echo " --cython [...] -- run Cython with the given arguments"
echo " --ecl [...], --lisp [...] -- run Sage's copy of ECL (Embeddable"
echo " Common Lisp) with the given arguments"
echo " --gap [...] -- run Sage's Gap with the given arguments"
echo " --gap3 [...] -- run Sage's Gap3 with the given arguments"
command -v gap3 &>/dev/null || \
echo " (not installed currently, run sage -i gap3)"
echo " --git [...] -- run Sage's Git with the given arguments"
echo " --gp [...] -- run Sage's PARI/GP calculator with the"
echo " given arguments"
echo " --kash [...] -- run Sage's Kash with the given arguments"
command -v kash &>/dev/null || \
echo " (not installed currently, run sage -i kash)"
echo " --M2 [...] -- run Sage's Macaulay2 with the given arguments"
command -v M2 &>/dev/null || \
echo " (not installed currently, run sage -i macaulay2)"
echo " --maxima [...] -- run Sage's Maxima with the given arguments"
echo " --mwrank [...] -- run Sage's mwrank with the given arguments"
echo " --polymake [...] -- run Sage's Polymake with given arguments"
command -v polymake &>/dev/null || \
echo " (not installed currently, run sage -i polymake)"
echo " -R [...] -- run Sage's R with the given arguments"
echo " --scons [...] -- run Sage's scons"
echo " --singular [...] -- run Sage's singular with the given arguments"
echo " --sqlite3 [...] -- run Sage's sqlite3 with given arguments"
echo
#### 1.......................26..................................................78
#### |.....................--.|...................................................|
}
Expand Down Expand Up @@ -189,95 +161,6 @@ if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
exec sage-python -m sage_setup.docbuild "$@" </dev/null
fi

#####################################################################
# Run Sage's versions of its component packages
#####################################################################

if [ "$1" = '-axiom' -o "$1" = '--axiom' ]; then
shift
exec axiom "$@"
fi

if [ "$1" = "-cython" -o "$1" = '--cython' -o "$1" = '-pyrex' -o "$1" = "--pyrex" ]; then
shift
exec sage-cython "$@"
fi

if [ "$1" = '-gap' -o "$1" = '--gap' ]; then
shift
exec gap "$@"
fi

if [ "$1" = '-gap3' -o "$1" = '--gap3' ]; then
shift
exec gap3 "$@"
fi

if [ "$1" = '-gp' -o "$1" = '--gp' ]; then
shift
exec gp "$@"
fi

if [ "$1" = '-polymake' -o "$1" = '--polymake' ]; then
shift
exec polymake "$@"
fi

if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift
exec Singular "$@"
fi

if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
shift
exec sqlite3 "$@"
fi

if [ "$1" = '-ecl' -o "$1" = '--ecl' ]; then
shift
exec ecl "$@"
fi

if [ "$1" = '-lisp' -o "$1" = '--lisp' ]; then
shift
exec ecl "$@"
fi

if [ "$1" = '-kash' -o "$1" = '--kash' ]; then
shift
exec kash "$@"
fi

if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
fi

if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
shift
exec mwrank "$@"
fi

if [ "$1" = '-M2' -o "$1" = '--M2' ]; then
shift
exec M2 "$@"
fi

if [ "$1" = '-scons' -o "$1" = '--scons' ]; then
shift
exec scons "$@"
fi

if [ "$1" = '-R' -o "$1" = '--R' ]; then
shift
exec R "$@"
fi

if [ "$1" = '-git' -o "$1" = '--git' ]; then
shift
exec git "$@"
fi

if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then
shift
exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD
Expand Down
114 changes: 114 additions & 0 deletions src/bin/sage
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,41 @@ usage_advanced() {
echo
echo "Running external programs:"
echo
echo " --cython [...] -- run Cython with the given arguments"
echo " --ecl [...], --lisp [...] -- run Sage's copy of ECL (Embeddable"
echo " Common Lisp) with the given arguments"
echo " --gap [...] -- run Sage's Gap with the given arguments"
echo " --gap3 [...] -- run Sage's Gap3 with the given arguments"
command -v gap3 &>/dev/null || \
echo " (not installed currently, run sage -i gap3)"
echo " --gdb -- run Sage under the control of gdb"
echo " --gdb-ipython -- run Sage's IPython under the control of gdb"
echo " --git [...] -- run Sage's Git with the given arguments"
echo " --gp [...] -- run Sage's PARI/GP calculator with the"
echo " given arguments"
echo " --ipython [...], --ipython3 [...]"
echo " -- run Sage's IPython using the default"
echo " environment (not Sage), passing additional"
echo " additional options to IPython"
echo " --jupyter [...] -- run Sage's Jupyter with given arguments"
echo " --kash [...] -- run Sage's Kash with the given arguments"
command -v kash &>/dev/null || \
echo " (not installed currently, run sage -i kash)"
echo " --M2 [...] -- run Sage's Macaulay2 with the given arguments"
command -v M2 &>/dev/null || \
echo " (not installed currently, run sage -i macaulay2)"
echo " --maxima [...] -- run Sage's Maxima with the given arguments"
echo " --mwrank [...] -- run Sage's mwrank with the given arguments"
echo " --pip [...] -- invoke pip, the Python package manager"
echo " --polymake [...] -- run Sage's Polymake with given arguments"
command -v polymake &>/dev/null || \
echo " (not installed currently, run sage -i polymake)"
echo " --python [...], --python3 [...]"
echo " -- run the Python 3 interpreter"
echo " -R [...] -- run Sage's R with the given arguments"
echo " --scons [...] -- run Sage's scons"
echo " --singular [...] -- run Sage's singular with the given arguments"
echo " --sqlite3 [...] -- run Sage's sqlite3 with given arguments"
echo
echo "Running the notebook:"
echo
Expand Down Expand Up @@ -512,6 +537,95 @@ if [ "$1" = '-jupyter' -o "$1" = '--jupyter' ]; then
exec "$SAGE_LOCAL"/bin/jupyter "$@"
fi

#####################################################################
# Run Sage's versions of its component packages
#####################################################################

if [ "$1" = '-axiom' -o "$1" = '--axiom' ]; then
shift
exec axiom "$@"
fi

if [ "$1" = "-cython" -o "$1" = '--cython' -o "$1" = '-pyrex' -o "$1" = "--pyrex" ]; then
shift
exec sage-cython "$@"
fi

if [ "$1" = '-gap' -o "$1" = '--gap' ]; then
shift
exec gap "$@"
fi

if [ "$1" = '-gap3' -o "$1" = '--gap3' ]; then
shift
exec gap3 "$@"
fi

if [ "$1" = '-gp' -o "$1" = '--gp' ]; then
shift
exec gp "$@"
fi

if [ "$1" = '-polymake' -o "$1" = '--polymake' ]; then
shift
exec polymake "$@"
fi

if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
shift
exec Singular "$@"
fi

if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
shift
exec sqlite3 "$@"
fi

if [ "$1" = '-ecl' -o "$1" = '--ecl' ]; then
shift
exec ecl "$@"
fi

if [ "$1" = '-lisp' -o "$1" = '--lisp' ]; then
shift
exec ecl "$@"
fi

if [ "$1" = '-kash' -o "$1" = '--kash' ]; then
shift
exec kash "$@"
fi

if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
shift
exec maxima "$@"
fi

if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
shift
exec mwrank "$@"
fi

if [ "$1" = '-M2' -o "$1" = '--M2' ]; then
shift
exec M2 "$@"
fi

if [ "$1" = '-scons' -o "$1" = '--scons' ]; then
shift
exec scons "$@"
fi

if [ "$1" = '-R' -o "$1" = '--R' ]; then
shift
exec R "$@"
fi

if [ "$1" = '-git' -o "$1" = '--git' ]; then
shift
exec git "$@"
fi

#####################################################################
# sage --sh and sage --buildsh
#####################################################################
Expand Down

0 comments on commit 4a3d36e

Please sign in to comment.