Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdelements/bashtester
A simple docker-compose setup to test bash code on older versions when given a bash file with a `test_${0}` function
https://github.com/sdelements/bashtester
Last synced: about 2 hours ago
JSON representation
A simple docker-compose setup to test bash code on older versions when given a bash file with a `test_${0}` function
- Host: GitHub
- URL: https://github.com/sdelements/bashtester
- Owner: sdelements
- License: apache-2.0
- Created: 2018-11-27T15:19:37.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-03T19:54:55.000Z (almost 6 years ago)
- Last Synced: 2024-11-06T17:42:43.227Z (about 2 months ago)
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 39
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bashtester
A simple docker-compose setup to test bash code on all currently supported
versions.Typically this would be used as a git submodule and will map it's parent directory as /code
### Usage
```bash
./run.sh '{command_to_run}'
```### Examples
```bash
./run.sh 'bash --version' 2> /dev/null
Importing /home/ubuntu/shtdlib/shtdlib.sh
########## 3.0.22 ##########
GNU bash, version 3.00.22(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2004 Free Software Foundation, Inc.
############################
########## 3.1.23 ##########
GNU bash, version 3.1.23(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2005 Free Software Foundation, Inc.
############################
########## 3.2.57 ##########
GNU bash, version 3.2.57(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2007 Free Software Foundation, Inc.
############################
########## 4.0.44 ##########
GNU bash, version 4.0.44(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
########## 4.1.17 ##########
GNU bash, version 4.1.17(2)-release (x86_64-pc-linux-musl)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
########## 4.2.53 ##########
GNU bash, version 4.2.53(2)-release (x86_64-pc-linux-musl)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
########## 4.3.48 ##########
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
########## 4.4.23 ##########
GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
########## 5.0-beta ##########
GNU bash, version 5.0.0(1)-beta (x86_64-pc-linux-musl)
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
```Example specifying versions:
```bash
bash_images="3.1.23 4.4.23" ./run.sh 'bash --version' 2> /dev/null
Importing /home/ubuntu/shtdlib/shtdlib.sh
########## 3.1.23 ##########
GNU bash, version 3.1.23(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2005 Free Software Foundation, Inc.
############################
########## 4.4.23 ##########
GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or laterThis is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
############################
```