-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now we offer only two kinds of images. One of them contains recent shells that one should use when targeting modern shells. It provides the two most recent versions of each interpreter. The other image contains all we can build. It is ideal for writing more general libraries or frameworks that need to be backwards- compatible with older shells, or maybe run in exotic environments. Some shells were removed. unbourne makes no sense since cosmo is able to build both dash and bash now. mrsh is just not there, it has a different idea of what local should be than every other shell. gwsh is cool, but it is the same as dash. These would probably just confuse users instead of helping with compatibility.
- Loading branch information
Showing
19 changed files
with
148 additions
and
2,339 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,35 @@ | ||
# alganet/shell-versions | ||
|
||
[![Docker Build](https://github.com/alganet/shell-versions/actions/workflows/docker.yml/badge.svg?branch=main)](https://github.com/alganet/shell-versions/actions/workflows/docker.yml) | ||
[![Docker Build](https://github.com/alganet/shell-versions/actions/workflows/docker-push.yml/badge.svg?branch=main)](https://github.com/alganet/shell-versions/actions/workflows/docker-push.yml) | ||
|
||
Multiple versions of multiple shells. | ||
Multiple versions of multiple shells. Ideal for testing portable shell scripts. | ||
|
||
## Multiple Shell Image (~40MB) | ||
## Images | ||
|
||
- [multi](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=multi-) - The latest supported version of each supported shell | ||
- **latest** - Contains the two most recent versions of each shell. Ideal for testing up to date scripts. | ||
- **all** - Everything we can build in a single image. Ideal for testing legacy and backwards compatible scripts. | ||
|
||
You can list the shells in your image: | ||
|
||
```sh | ||
$ docker run -it --rm alganet/shell-versions find /opt -type f | ||
/opt/posh_0.14.1/bin/posh | ||
/opt/dash_0.5.11/bin/dash | ||
/opt/yash_2.53/bin/yash | ||
/opt/zsh_5.9/bin/zsh | ||
/opt/osh_0.14.0/bin/osh | ||
/opt/busybox_1.36.0/bin/busybox | ||
/opt/loksh_7.2/bin/loksh | ||
/opt/ksh_93u+m-v1.0.4/bin/ksh | ||
/opt/ksh_93u+m-v1.0.4/bin/shcomp | ||
/opt/bash_5.2.15/bin/bash | ||
/opt/oksh_7.2/bin/oksh | ||
/opt/mksh_R59c/bin/mksh | ||
/opt/dash_0.5.11/bin/dash | ||
... | ||
``` | ||
|
||
And run them by choosing a version: | ||
|
||
```sh | ||
$ docker run -it --rm alganet/shell-versions /opt/bash_5.2.15/bin/bash -c "echo hello there" | ||
hello there | ||
``` | ||
|
||
## Single Shell Images (~30MB each) | ||
|
||
- [bash](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=bash-) | ||
- [busybox](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=busybox-) - Only the `ash` and `hush` applets and their dependencies are built. | ||
- [dash](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=dash-) | ||
- [gwsh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=gwsh-) | ||
- [ksh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=ksh-) - `shcomp` is also available. | ||
- [loksh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=loksh-) | ||
- [mksh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=mksh-) | ||
- [oksh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=oksh-) | ||
- [osh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=osh-) | ||
- [posh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=posh-) | ||
- [yash](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=yash-) | ||
- [zsh](https://hub.docker.com/r/alganet/shell-versions/tags?page=1&ordering=name&name=zsh-) | ||
|
||
Check out the [full list of tags](https://hub.docker.com/r/alganet/shell-versions/tags). | ||
|
||
|
||
## Building Locally | ||
|
||
You can pass a list of versions to `TARGETS=` or use `sh shvr.sh [current|targets]` to let the script generate a list for you: | ||
|
||
```sh | ||
$ docker build -t "mydash" --build-arg TARGETS="dash_0.5.12" . | ||
$ docker run -it --rm mydash ls /opt | ||
$ docker build -t "mymultishell" --build-arg TARGETS="$(sh shvr.sh targets)" . | ||
$ docker run -it --rm "mymultishell" ls /opt | ||
``` | ||
|
||
You can pass multiple targets separated by space, see a list of possible ones on the `.github/workflows/docker.yml` file. | ||
|
||
Each script on the `variants` folder should be able to handle new versions of each shell as they come out. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_bash () | ||
{ | ||
cat <<-@ | ||
bash_5.2.21 | ||
bash_5.1.16 | ||
@ | ||
} | ||
|
||
shvr_targets_bash () | ||
{ | ||
cat <<-@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_busybox () | ||
{ | ||
cat <<-@ | ||
busybox_1.36.1 | ||
busybox_1.35.0 | ||
@ | ||
} | ||
|
||
shvr_targets_busybox () | ||
{ | ||
cat <<-@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_dash () | ||
{ | ||
cat <<-@ | ||
dash_0.5.12 | ||
dash_0.5.11.5 | ||
@ | ||
} | ||
|
||
shvr_targets_dash () | ||
{ | ||
cat <<-@ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,33 +3,42 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_ksh () | ||
{ | ||
cat <<-@ | ||
ksh_shvrA93uplusm-v1.0.9 | ||
ksh_shvrA93uplusm-v1.0.8 | ||
@ | ||
} | ||
|
||
shvr_targets_ksh () | ||
{ | ||
cat <<-@ | ||
ksh_93u+m-v1.0.8 | ||
ksh_93u+m-v1.0.7 | ||
ksh_93u+m-v1.0.6 | ||
ksh_93u+m-v1.0.4 | ||
ksh_93u+m-v1.0.3 | ||
ksh_93u+m-v1.0.2 | ||
ksh_93u+m-v1.0.1 | ||
ksh_2020-2020.0.0 | ||
ksh_history-b_2016-01-10 | ||
ksh_history-b_2012-08-01 | ||
ksh_history-b_2011-03-10 | ||
ksh_history-b_2010-10-26 | ||
ksh_history-b_2010-06-21 | ||
ksh_history-b_2008-11-04 | ||
ksh_history-b_2008-06-08 | ||
ksh_history-b_2008-02-02 | ||
ksh_history-b_2007-01-11 | ||
ksh_history-b_2006-11-15 | ||
ksh_history-b_2006-07-24 | ||
ksh_history-b_2006-02-14 | ||
ksh_history-b_2005-09-16 | ||
ksh_history-b_2005-06-01 | ||
ksh_history-b_2005-02-02 | ||
ksh_history-b_2004-10-11 | ||
ksh_shvrA93uplusm-v1.0.9 | ||
ksh_shvrA93uplusm-v1.0.8 | ||
ksh_shvrA93uplusm-v1.0.7 | ||
ksh_shvrA93uplusm-v1.0.6 | ||
ksh_shvrA93uplusm-v1.0.4 | ||
ksh_shvrA93uplusm-v1.0.3 | ||
ksh_shvrA93uplusm-v1.0.2 | ||
ksh_shvrA93uplusm-v1.0.1 | ||
ksh_shvrB2020-2020.0.0 | ||
ksh_shvrChistory-b_2016-01-10 | ||
ksh_shvrChistory-b_2012-08-01 | ||
ksh_shvrChistory-b_2011-03-10 | ||
ksh_shvrChistory-b_2010-10-26 | ||
ksh_shvrChistory-b_2010-06-21 | ||
ksh_shvrChistory-b_2008-11-04 | ||
ksh_shvrChistory-b_2008-06-08 | ||
ksh_shvrChistory-b_2008-02-02 | ||
ksh_shvrChistory-b_2007-01-11 | ||
ksh_shvrChistory-b_2006-11-15 | ||
ksh_shvrChistory-b_2006-07-24 | ||
ksh_shvrChistory-b_2006-02-14 | ||
ksh_shvrChistory-b_2005-09-16 | ||
ksh_shvrChistory-b_2005-06-01 | ||
ksh_shvrChistory-b_2005-02-02 | ||
ksh_shvrChistory-b_2004-10-11 | ||
@ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_loksh () | ||
{ | ||
cat <<-@ | ||
loksh_7.5 | ||
loksh_7.4 | ||
@ | ||
} | ||
|
||
shvr_targets_loksh () | ||
{ | ||
cat <<-@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_mksh () | ||
{ | ||
cat <<-@ | ||
mksh_R59c | ||
mksh_R58 | ||
@ | ||
} | ||
|
||
shvr_targets_mksh () | ||
{ | ||
cat <<-@ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_oksh () | ||
{ | ||
cat <<-@ | ||
oksh_7.5 | ||
oksh_7.4 | ||
@ | ||
} | ||
|
||
shvr_targets_oksh () | ||
{ | ||
cat <<-@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_osh () | ||
{ | ||
cat <<-@ | ||
osh_0.22.0 | ||
osh_0.21.0 | ||
@ | ||
} | ||
|
||
shvr_targets_osh () | ||
{ | ||
cat <<-@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,14 @@ | |
# Copyright (c) Alexandre Gomes Gaigalas <[email protected]> | ||
# SPDX-License-Identifier: ISC | ||
|
||
shvr_current_posh () | ||
{ | ||
cat <<-@ | ||
posh_0.14.1 | ||
posh_0.13.2 | ||
@ | ||
} | ||
|
||
shvr_targets_posh () | ||
{ | ||
cat <<-@ | ||
|
Oops, something went wrong.