/usr/share/sagemath/bin/sage-update-src is in sagemath-common 8.1-7ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/env bash
# Do this before "set -e", as sage-env might give (harmless) errors.
source local/bin/sage-env
set -e
# People often move the Sage install right before doing the upgrade, so it's
# important to fix any path hardcoding issues first, or certain library
# links will fail.
sage-location
usage () {
CMD="${0##*/}"
echo "usage: $CMD [version]"
}
if [ "$#" -gt 1 ]; then
usage
exit 1
fi
if [ "$#" -gt 0 ]; then
BRANCH="$1"
shift
echo "Upgrading to $BRANCH"
else
BRANCH="master"
echo "Upgrading to the latest development version"
fi
git fetch origin "$BRANCH"
git merge --ff-only FETCH_HEAD
|