Skip to content

Commit

Permalink
Entrypoint update
Browse files Browse the repository at this point in the history
Simplifies the handling of command-line arguments.
  • Loading branch information
Aeron committed Jul 6, 2024
1 parent 81ddb80 commit 2d9d300
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ _strip_name() {
echo "$1" | tr '@&+.:' '-' | tr -d '=!%^#$\/()[]{}|;<>, ' | xargs
}

original_name="$2"
stripped_name="$(_strip_name "$2")"
password="$3"

set -- "$1" "$stripped_name" "$password"
set -- "$1" "$(_strip_name "$2")" "$3"
if [ -z "$2" ]; then
set -- "$1" 'socks' "$password"
set -- "$1" 'socks' "$3"
fi

# shellcheck disable=SC2016
Expand Down

0 comments on commit 2d9d300

Please sign in to comment.