This is an automated email from the ASF dual-hosted git repository.
william pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new 3870ecdee ORC-1323: Make `docker/reinit.sh` support target OS arguments
3870ecdee is described below
commit 3870ecdeedd0d7f6563c514b27495c3e464d3a06
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Dec 1 00:29:50 2022 -0800
ORC-1323: Make `docker/reinit.sh` support target OS arguments
### What changes were proposed in this pull request?
This PR aims to support target OS arguments in `docker/reinit.sh`.
### Why are the changes needed?
Currently, it re-generates all Ones.
### How was this patch tested?
Manually.
```
$ cd docker
$ ./reinit.sh centos7
Target: centos7
Re-initialize apache/orc-dev:centos7
...
$ ./reinit.sh centos7 ubuntu22
Target: centos7 ubuntu22
Re-initialize apache/orc-dev:centos7
...
$ ./reinit.sh
Target: centos7 debian10 debian11 ubuntu18 ubuntu20 ubuntu22 fedora37
debian10_jdk=11 ubuntu20_jdk=11 ubuntu20_jdk=11_cc=clang
Re-initialize apache/orc-dev:centos7
...
```
Closes #1330 from dongjoon-hyun/ORC-1323.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: William Hyun <[email protected]>
---
docker/reinit.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docker/reinit.sh b/docker/reinit.sh
index e6d84b487..74d4c60f5 100755
--- a/docker/reinit.sh
+++ b/docker/reinit.sh
@@ -16,7 +16,11 @@
# limitations under the License.
start=`date`
-for build in `cat os-list.txt`; do
+
+TARGET=${@:-`cat os-list.txt`}
+echo "Target:" $TARGET
+
+for build in $TARGET; do
OS=$(echo "$build" | cut -d '_' -f1)
REST=$(echo "$build" | cut -d '_' -f2- -s)
if [ -z "$REST" ]; then