diff options
author | Gavin Howard <gavin@yzena.com> | 2021-06-15 11:01:29 -0600 |
---|---|---|
committer | Gavin Howard <gavin@yzena.com> | 2021-06-15 11:01:29 -0600 |
commit | 781e6ebca55f955789672d85d15cb08ca9f433ec (patch) | |
tree | 02009265636e52d3cc162efa5b4bcdc51f743e32 | |
parent | e03294f69db1a620d7388980a18106f8d000b4c2 (diff) | |
download | bc-781e6ebca55f955789672d85d15cb08ca9f433ec.tar.gz |
Move a lot of scripts to a scripts/ directory
Signed-off-by: Gavin Howard <gavin@yzena.com>
-rw-r--r-- | LICENSE.md | 4 | ||||
-rw-r--r-- | Makefile.in | 16 | ||||
-rw-r--r-- | NEWS.md | 9 | ||||
-rw-r--r-- | README.md | 13 | ||||
-rw-r--r-- | RELEASE.md | 8 | ||||
-rwxr-xr-x | configure.sh | 2 | ||||
-rw-r--r-- | manuals/algorithms.md | 4 | ||||
-rwxr-xr-x | scripts/exec-install.sh (renamed from exec-install.sh) | 0 | ||||
-rwxr-xr-x | scripts/functions.sh (renamed from functions.sh) | 0 | ||||
-rwxr-xr-x | scripts/karatsuba.py (renamed from karatsuba.py) | 0 | ||||
-rwxr-xr-x | scripts/link.sh (renamed from link.sh) | 0 | ||||
-rwxr-xr-x | scripts/locale_install.sh (renamed from locale_install.sh) | 0 | ||||
-rwxr-xr-x | scripts/locale_uninstall.sh (renamed from locale_uninstall.sh) | 0 | ||||
-rwxr-xr-x | scripts/manpage.sh (renamed from manpage.sh) | 0 | ||||
-rwxr-xr-x | scripts/release.sh (renamed from release.sh) | 14 | ||||
-rwxr-xr-x | scripts/safe-install.sh (renamed from safe-install.sh) | 0 | ||||
-rwxr-xr-x | tests/all.sh | 2 | ||||
-rwxr-xr-x | tests/errors.sh | 2 | ||||
-rwxr-xr-x | tests/other.sh | 2 | ||||
-rwxr-xr-x | tests/radamsa.sh | 2 | ||||
-rwxr-xr-x | tests/read.sh | 2 | ||||
-rwxr-xr-x | tests/script.sh | 2 | ||||
-rwxr-xr-x | tests/stdin.sh | 2 | ||||
-rwxr-xr-x | tests/test.sh | 2 |
24 files changed, 40 insertions, 46 deletions
@@ -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 diff --git a/Makefile.in b/Makefile.in index 9c637cac..5c647e26 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/configure.sh b/configure.sh index f3106c79..9b043426 100755 --- a/configure.sh +++ b/configure.sh @@ -31,7 +31,7 @@ script="$0" scriptdir=$(dirname "$script") script=$(basename "$script") -. "$scriptdir/functions.sh" +. "$scriptdir/scripts/functions.sh" cd "$scriptdir" diff --git a/manuals/algorithms.md b/manuals/algorithms.md index 172401e1..480cac56 100644 --- a/manuals/algorithms.md +++ b/manuals/algorithms.md @@ -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.*** diff --git a/exec-install.sh b/scripts/exec-install.sh index 5905fd18..5905fd18 100755 --- a/exec-install.sh +++ b/scripts/exec-install.sh diff --git a/functions.sh b/scripts/functions.sh index 87f3c85c..87f3c85c 100755 --- a/functions.sh +++ b/scripts/functions.sh diff --git a/karatsuba.py b/scripts/karatsuba.py index 0a63cd58..0a63cd58 100755 --- a/karatsuba.py +++ b/scripts/karatsuba.py diff --git a/link.sh b/scripts/link.sh index b983fa21..b983fa21 100755 --- a/link.sh +++ b/scripts/link.sh diff --git a/locale_install.sh b/scripts/locale_install.sh index 6c9c2924..6c9c2924 100755 --- a/locale_install.sh +++ b/scripts/locale_install.sh diff --git a/locale_uninstall.sh b/scripts/locale_uninstall.sh index d97fc759..d97fc759 100755 --- a/locale_uninstall.sh +++ b/scripts/locale_uninstall.sh diff --git a/manpage.sh b/scripts/manpage.sh index aefd2bfb..aefd2bfb 100755 --- a/manpage.sh +++ b/scripts/manpage.sh diff --git a/release.sh b/scripts/release.sh index 2c506efa..f479fa13 100755 --- a/release.sh +++ b/scripts/release.sh @@ -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' diff --git a/safe-install.sh b/scripts/safe-install.sh index 04108838..04108838 100755 --- a/safe-install.sh +++ b/scripts/safe-install.sh diff --git a/tests/all.sh b/tests/all.sh index 1f745cdf..5d6a2a25 100755 --- a/tests/all.sh +++ b/tests/all.sh @@ -32,7 +32,7 @@ set -e script="$0" testdir=$(dirname "$script") -. "$testdir/../functions.sh" +. "$testdir/../scripts/functions.sh" if [ "$#" -ge 1 ]; then d="$1" diff --git a/tests/errors.sh b/tests/errors.sh index 4654aed2..e8c0d7c1 100755 --- a/tests/errors.sh +++ b/tests/errors.sh @@ -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" diff --git a/tests/other.sh b/tests/other.sh index e13891fc..5354cbe8 100755 --- a/tests/other.sh +++ b/tests/other.sh @@ -32,7 +32,7 @@ set -e script="$0" testdir=$(dirname "$script") -. "$testdir/../functions.sh" +. "$testdir/../scripts/functions.sh" if [ "$#" -ge 1 ]; then d="$1" diff --git a/tests/radamsa.sh b/tests/radamsa.sh index 236953ae..61035e06 100755 --- a/tests/radamsa.sh +++ b/tests/radamsa.sh @@ -61,7 +61,7 @@ shift dir=$(dirname "$script") -. "$dir/../functions.sh" +. "$dir/../scripts/functions.sh" bcdir="$dir/../bin" diff --git a/tests/read.sh b/tests/read.sh index e9d30685..6eb07ee2 100755 --- a/tests/read.sh +++ b/tests/read.sh @@ -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" diff --git a/tests/script.sh b/tests/script.sh index b7c707ac..92f62590 100755 --- a/tests/script.sh +++ b/tests/script.sh @@ -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" diff --git a/tests/stdin.sh b/tests/stdin.sh index 581a6df5..295a981f 100755 --- a/tests/stdin.sh +++ b/tests/stdin.sh @@ -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" diff --git a/tests/test.sh b/tests/test.sh index c6c4cc25..172d3aab 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -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" |