Skip to content

Commit

Permalink
feat: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
the-soloist committed Nov 26, 2024
1 parent a4c44b4 commit fc7ecb1
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 32 deletions.
2 changes: 1 addition & 1 deletion build/ubuntu/lts/16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN apt-get update && \
# install custom tools
RUN bash /opt/env/install.sh && \
bash /opt/env/pyenv/install.sh && \
bash /opt/env/pyenv/python-3.8.sh
bash /opt/env/pyenv/python.sh -p 3.8.19

# install pwn tools
RUN bash /opt/env/pwn/python.sh -p 3.8.19
Expand Down
2 changes: 1 addition & 1 deletion build/ubuntu/lts/18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN apt-get update && \
# install custom tools
RUN bash /opt/env/install.sh && \
bash /opt/env/pyenv/install.sh && \
bash /opt/env/pyenv/python-3.10.sh
bash /opt/env/pyenv/python.sh -p 3.10.14

# install pwn tools
RUN bash /opt/env/pwn/python.sh -p 3.10.14
Expand Down
2 changes: 1 addition & 1 deletion build/ubuntu/lts/20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN apt-get update && \
# install custom tools
RUN bash /opt/env/install.sh && \
bash /opt/env/pyenv/install.sh && \
bash /opt/env/pyenv/python-3.10.sh
bash /opt/env/pyenv/python.sh -p 3.10.14

# install pwn tools
RUN bash /opt/env/pwn/python.sh -p 3.10.14
Expand Down
4 changes: 2 additions & 2 deletions docker/env/pwn/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -x

function print_help() {
echo "Usage: $0 <python-version>"
echo " e.g.: $0 3.8.16"
echo "Usage: $0 -p <python-version>"
echo " e.g.: $0 -p 3.8.16"
exit 1
}

Expand Down
9 changes: 0 additions & 9 deletions docker/env/pyenv/python-2.7.sh

This file was deleted.

9 changes: 0 additions & 9 deletions docker/env/pyenv/python-3.10.sh

This file was deleted.

9 changes: 0 additions & 9 deletions docker/env/pyenv/python-3.8.sh

This file was deleted.

23 changes: 23 additions & 0 deletions docker/env/pyenv/python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
set -x

function print_help() {
echo "Usage: $0 -p <python-version>"
echo " e.g.: $0 -p 3.8.16"
exit 1
}

while getopts "p:h" OPT; do
case $OPT in
p) PY_VERSION="$OPTARG" ;;
h) print_help ;;
?) print_help ;;
esac
done

export PYENV_ROOT="/opt/pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(command pyenv init -)"

pyenv install $PY_VERSION

0 comments on commit fc7ecb1

Please sign in to comment.