diff --git a/.local/bin/runenv b/.local/bin/runenv index cebb9ab..29c5848 100755 --- a/.local/bin/runenv +++ b/.local/bin/runenv @@ -1,6 +1,7 @@ #!/bin/sh CONTAINER_IMAGE="registry.makerforce.io/ambrose/env" +CONTAINER_IMAGE_PWN="registry.makerforce.io/ambrose/pwn" CONTAINER_HOME="/home/ambrose" OPTIND=1 @@ -10,6 +11,7 @@ delete="" name="" ports="\n\t" volumes="" +image="$CONTAINER_IMAGE" show_help() { cat << EOF @@ -23,11 +25,12 @@ instead of a shell. -n NAME give container a NAME -p PORT forward host PORT to container PORT -v LIST mount volume LIST. specify as LOCAL:MOUNT + -t run pwntools instead EOF } -while getopts "hxwn:p:v:" opt; do +while getopts "hxwn:p:v:t" opt; do case "$opt" in x) delete="--rm " @@ -49,6 +52,9 @@ while getopts "hxwn:p:v:" opt; do show_help exit 0 ;; + t) + image="$CONTAINER_IMAGE_PWN" + ;; :) echo "Option -$OPTARG requires an argument." >&2 show_help @@ -69,11 +75,11 @@ if [ "$ports" = "\n\t" ]; then ports="" fi -docker pull $CONTAINER_IMAGE +docker pull $image cmd="\n\ docker run -it $delete$name$ports$workdir$volumes\n\ - $CONTAINER_IMAGE \n\ + $image \n\ $@\ " diff --git a/.local/bin/share b/.local/bin/share index 2cd3de8..68dafbc 100755 --- a/.local/bin/share +++ b/.local/bin/share @@ -48,6 +48,7 @@ while getopts "hn:e:f:" opt; do echo " -n NAME Share FILE at /$BUCKET/NAME" echo " -e EXPIRES Set link expiry (NN[h|m|s] or 'none') (default: $EXPIRE)" echo "" + exit 0 ;; n) NAME="$OPTARG"