Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3-manifolds
GitHub Repository: 3-manifolds/Sage_macOS
Path: blob/main/Sage_base/build_base.sh
170 views
1
if ! [ -e sage ]; then
2
echo "The sage directory is not where we expect to find it."
3
echo "This script must be run from the Sage_base directory."
4
exit 1
5
fi
6
7
# CI can't check the version without a Sage repo.
8
VERSION=10.7
9
SAGE_SYMLINK="/var/tmp/sage-$VERSION-current"
10
11
# By default, a sage build cannot be relocated. Sage_macOS is
12
# relocatable. This is done by using a symlink in /var/tmp which
13
# points to the current location of the sage root.
14
#
15
# To make this work, we relocate the sage source tree to the location
16
# where the sage symlink will be when sage is actually being run. This
17
# tricks the sage build system into generating appropriate shebangs
18
# for installed scripts and deals with any other random places where
19
# sage may use a hardwired path to the sage root.
20
#
21
22
if [ -L ${SAGE_SYMLINK} ]; then
23
rm ${SAGE_SYMLINK}
24
elif [ -e ${SAGE_SYMLINK} ]; then
25
echo ${SAGE_SYMLINK} is not a symlink !!!
26
exit 1
27
fi
28
29
mv sage ${SAGE_SYMLINK}
30
pushd ${SAGE_SYMLINK}
31
gmake
32
popd
33
mv /var/tmp/sage-$VERSION-current sage
34
35