Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 871b530

Browse files
author
Release Manager
committed
Trac #30979: Remove duplication of options handled in src/bin/sage and build/bin/sage-site
(from #30846) We remove the duplication of lines like {{{ if [ "$1" = '-optional' -o "$1" = "--optional" ]; then shift exec sage-list-packages optional $@ fi }}} in `src/bin/sage` and `build/bin/sage-site`. We keep handling of the option `--installed` in `src/bin/sage` in anticipation of #30940 (`src/bin/sage-list-packages`: Make it work if `SAGE_ROOT` is not available). URL: https://trac.sagemath.org/30979 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Jonathan Kliem
2 parents 86310bf + 87dad36 commit 871b530

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

build/bin/sage-site

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@ if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
128128
exec sage-list-packages standard $@
129129
fi
130130

131-
if [ "$1" = '-installed' -o "$1" = "--installed" ]; then
132-
shift
133-
exec sage-list-packages all --installed-only $@
134-
fi
135-
136-
if [ "$1" = '-p' ]; then
137-
echo "Error: Installing old-style SPKGs is no longer supported."
138-
exit 1
139-
fi
140-
141131
if [ "$1" = '-info' -o "$1" = '--info' ]; then
142132
shift
143133
for PKG in "$@"

src/bin/sage

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -979,27 +979,6 @@ install() {
979979
exit 0
980980
}
981981

982-
983-
if [ "$1" = '-package' -o "$1" = "--package" ]; then
984-
shift
985-
exec sage-package $@
986-
fi
987-
988-
if [ "$1" = '-optional' -o "$1" = "--optional" ]; then
989-
shift
990-
exec sage-list-packages optional $@
991-
fi
992-
993-
if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then
994-
shift
995-
exec sage-list-packages experimental $@
996-
fi
997-
998-
if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
999-
shift
1000-
exec sage-list-packages standard $@
1001-
fi
1002-
1003982
if [ "$1" = '-installed' -o "$1" = "--installed" ]; then
1004983
shift
1005984
exec sage-list-packages all --installed-only $@
@@ -1014,15 +993,6 @@ if [ "$1" = '-p' ]; then
1014993
install "$@"
1015994
fi
1016995

1017-
if [ "$1" = '-info' -o "$1" = '--info' ]; then
1018-
shift
1019-
for PKG in "$@"
1020-
do
1021-
sage-spkg --info "$PKG" || exit $?
1022-
done
1023-
exit 0
1024-
fi
1025-
1026996
if [ "$1" = '-sdist' -o "$1" = "--sdist" ]; then
1027997
maybe_sage_location
1028998
shift

0 commit comments

Comments
 (0)