Move a lot of scripts to a scripts/ directory

Signed-off-by: Gavin Howard <gavin@yzena.com>
computed_goto
Gavin Howard 1 year ago
parent e03294f69d
commit 781e6ebca5
Signed by: gavin
GPG Key ID: C08038BDF280D33E
  1. 4
      LICENSE.md
  2. 16
      Makefile.in
  3. 9
      NEWS.md
  4. 13
      README.md
  5. 8
      RELEASE.md
  6. 2
      configure.sh
  7. 4
      manuals/algorithms.md
  8. 0
      scripts/exec-install.sh
  9. 0
      scripts/functions.sh
  10. 0
      scripts/karatsuba.py
  11. 0
      scripts/link.sh
  12. 0
      scripts/locale_install.sh
  13. 0
      scripts/locale_uninstall.sh
  14. 0
      scripts/manpage.sh
  15. 14
      scripts/release.sh
  16. 0
      scripts/safe-install.sh
  17. 2
      tests/all.sh
  18. 2
      tests/errors.sh
  19. 2
      tests/other.sh
  20. 2
      tests/radamsa.sh
  21. 2
      tests/read.sh
  22. 2
      tests/script.sh
  23. 2
      tests/stdin.sh
  24. 2
      tests/test.sh

@ -79,9 +79,9 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## `safe-install.sh`
## `scripts/safe-install.sh`
The file `safe-install.sh` is under the following copyright and license:
The file `scripts/safe-install.sh` is under the following copyright and license:
Copyright (c) 2021 Rich Felker

@ -143,13 +143,15 @@ BC_ENABLE_MEMCHECK = %%MEMCHECK%%
RM = rm
MKDIR = mkdir
INSTALL = ./exec-install.sh
SAFE_INSTALL = ./safe-install.sh
LINK = ./link.sh
MANPAGE = ./manpage.sh
KARATSUBA = ./karatsuba.py
LOCALE_INSTALL = ./locale_install.sh
LOCALE_UNINSTALL = ./locale_uninstall.sh
SCRIPTS = ./scripts
INSTALL = $(SCRIPTS)/exec-install.sh
SAFE_INSTALL = $(SCRIPTS)/safe-install.sh
LINK = $(SCRIPTS)/link.sh
MANPAGE = $(SCRIPTS)/manpage.sh
KARATSUBA = $(SCRIPTS)/karatsuba.py
LOCALE_INSTALL = $(SCRIPTS)/locale_install.sh
LOCALE_UNINSTALL = $(SCRIPTS)/locale_uninstall.sh
VALGRIND_ARGS = --error-exitcode=100 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all

@ -324,8 +324,8 @@ running tests during install. **If `bc` segfaults while running arg tests when
updating, it is because the global locale files have not been replaced. Make
sure to either prevent the test suite from running on update or remove the old
locale files before updating.** (Removing the locale files can be done with
`make uninstall` or by running the `locale_uninstall.sh` script.) Once this is
done, `bc` should install without problems.*
`make uninstall` or by running the [`locale_uninstall.sh`][22] script.) Once
this is done, `bc` should install without problems.*
*Second, **the option to build without signal support has been removed**. See
below for the reasons why.*
@ -1098,7 +1098,7 @@ not thoroughly tested.
[1]: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[2]: https://pkg.musl.cc/bc/
[3]: http://lcamtuf.coredump.cx/afl/
[4]: ./karatsuba.py
[4]: ./scripts/karatsuba.py
[5]: ./README.md
[6]: ./configure.sh
[7]: https://github.com/rain-1/linenoise-mob
@ -1106,7 +1106,7 @@ not thoroughly tested.
[9]: ./manuals/bc/A.1.md
[10]: ./manuals/dc/A.1.md
[11]: https://scan.coverity.com/projects/gavinhoward-bc
[12]: ./locale_install.sh
[12]: ./scripts/locale_install.sh
[13]: ./manuals/build.md
[14]: https://github.com/stesser
[15]: https://github.com/bugcrazy
@ -1116,3 +1116,4 @@ not thoroughly tested.
[19]: ./manuals/benchmarks.md
[20]: https://github.com/apjanke/ronn-ng
[21]: https://pandoc.org/
[22]: ./scripts/locale_uninstall.sh

@ -243,7 +243,7 @@ allowed.
##### Karatsuba Number
Package and distro maintainers have one tool at their disposal to build this
`bc` in the optimal configuration: `karatsuba.py`.
`bc` in the optimal configuration: `scripts/karatsuba.py`.
This script is not a compile-time or runtime prerequisite; it is for package and
distro maintainers to run once when a package is being created. It finds the
@ -371,20 +371,10 @@ Files:
bcl.vcxproj.filters The Visual Studio filters file for bcl.
configure A symlink to configure.sh to make packaging easier.
configure.sh The configure script.
functions.sh A script with functions used by other scripts.
install.sh Install script.
karatsuba.py Script to find the optimal Karatsuba number.
LICENSE.md A Markdown form of the BSD 2-clause License.
link.sh A script to link dc to bc.
locale_install.sh A script to install locales, if desired.
locale_uninstall.sh A script to uninstall locales.
Makefile.in The Makefile template.
manpage.sh Script to generate man pages from markdown files
(maintainer use only).
NOTICE.md List of contributors and copyright owners.
RELEASE.md A checklist for making a release (maintainer use only).
release.sh A script to test for release (maintainer use only).
safe-install.sh Safe install script from musl libc.
Folders:
@ -393,6 +383,7 @@ Folders:
locales Locale files, in .msg format. Patches welcome for translations.
manuals Manuals for both programs.
src All source code.
scripts A bunch of shell scripts to help with development and building.
tests All tests.
[1]: https://www.gnu.org/software/bc/

@ -17,11 +17,11 @@ This is the checklist for cutting a release.
8. Find ASan crashes on AFL test cases.
9. Fix ASan crashes.
10. Build with xstatic.
11. Run and pass the `release.sh` script on my own machine.
12. Run and pass the `release.sh` script, without generated tests and
11. Run and pass the `scripts/release.sh` script on my own machine.
12. Run and pass the `scripts/release.sh` script, without generated tests and
sanitizers, on FreeBSD.
13. Run and pass the `release.sh` script, without generated tests, sanitizers,
and 64-bit, on Thalheim's ARM server.
13. Run and pass the `scripts/release.sh` script, without generated tests,
sanitizers, and 64-bit, on an ARM server.
14. Run and pass the release script, with no generated tests, no clang, no
sanitizers, and no valgrind, on NetBSD.
15. Run and pass the release script, with no generated tests, no clang, no

@ -31,7 +31,7 @@ script="$0"
scriptdir=$(dirname "$script")
script=$(basename "$script")
. "$scriptdir/functions.sh"
. "$scriptdir/scripts/functions.sh"
cd "$scriptdir"

@ -25,8 +25,8 @@ Brute force multiplication is used below `BC_NUM_KARATSUBA_LEN` digits. It is
polynomial (`O(n^2)`), but since Karatsuba requires both more intermediate
values (which translate to memory allocations) and a few more additions, there
is a "break even" point in the number of digits where brute force multiplication
is faster than Karatsuba. There is a script (`$ROOT/karatsuba.py`) that will
find the break even point on a particular machine.
is faster than Karatsuba. There is a script (`$ROOT/scripts/karatsuba.py`) that
will find the break even point on a particular machine.
***WARNING: The Karatsuba script requires Python 3.***

@ -29,23 +29,23 @@
# For OpenBSD, run using the following:
#
# ./release.sh 1 0 1 0 0 0 1 0 0 0
# scripts/release.sh 1 0 1 0 0 0 1 0 0 0
#
# For FreeBSD, run using the following:
#
# ./release.sh 1 0 1 0 0 0 1 0 1 0
# scripts/release.sh 1 0 1 0 0 0 1 0 1 0
#
# For Linux, run two separate ones (in different directories), like so:
#
# ./release.sh 1 1 1 0 0 0 1 0 1 0
# ./release.sh 1 1 0 1 0 0 1 0 1 0
# scripts/release.sh 1 1 1 0 0 0 1 0 1 0
# scripts/release.sh 1 1 0 1 0 0 1 0 1 0
#
# If you want to run sanitizers or valgrind, you can't do it with generated
# tests because they take too long, so if you would like to do that, use the
# following:
#
# ./release.sh 1 0 1 0 1 0 1 0 1 0
# ./release.sh 1 0 0 1 0 1 1 0 1 0
# scripts/release.sh 1 0 1 0 1 0 1 0 1 0
# scripts/release.sh 1 0 0 1 0 1 1 0 1 0
#
# If this script fails on any platform when starting the Karatsuba test, check
# that Python is installed, especially if the error says something like:
@ -616,7 +616,7 @@ if [ "$run_tests" -ne 0 ]; then
printf 'Then run the GitHub release script as follows:\n'
printf '\n'
printf ' <github_release> <version> .gitignore .gitattributes\\\n'
printf ' manpage.sh release.sh RELEASE.md tests/afl.py\\\n'
printf ' scripts/manpage.sh scripts/release.sh RELEASE.md tests/afl.py\\\n'
printf ' tests/radamsa.sh tests/radamsa.txt tests/randmath.py\\\n'
printf ' tests/fuzzing/ tests/bc/scripts/timeconst.bc\n'

@ -32,7 +32,7 @@ set -e
script="$0"
testdir=$(dirname "$script")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -ge 1 ]; then
d="$1"

@ -32,7 +32,7 @@
script="$0"
testdir=$(dirname "$script")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -eq 0 ]; then
printf 'usage: %s dir [exec args...]\n' "$script"

@ -32,7 +32,7 @@ set -e
script="$0"
testdir=$(dirname "$script")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -ge 1 ]; then
d="$1"

@ -61,7 +61,7 @@ shift
dir=$(dirname "$script")
. "$dir/../functions.sh"
. "$dir/../scripts/functions.sh"
bcdir="$dir/../bin"

@ -32,7 +32,7 @@ set -e
script="$0"
testdir=$(dirname "$script")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -lt 1 ]; then
printf 'usage: %s dir [exe [args...]]\n' "$0"

@ -33,7 +33,7 @@ script="$0"
testdir=$(dirname "${script}")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -lt 2 ]; then
printf 'usage: %s dir script [run_extra_tests] [run_stack_tests] [generate_tests] [time_tests] [exec args...]\n' "$script"

@ -33,7 +33,7 @@ script="$0"
testdir=$(dirname "$script")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -lt 1 ]; then
printf 'usage: %s dir [exe [args...]]\n' "$0"

@ -33,7 +33,7 @@ script="$0"
testdir=$(dirname "$script")
. "$testdir/../functions.sh"
. "$testdir/../scripts/functions.sh"
if [ "$#" -lt 2 ]; then
printf 'usage: %s dir test [generate_tests] [time_tests] [exe [args...]]\n' "$0"

Loading…
Cancel
Save