Merge branch 'master' of ssh://git.chaoticlogic.us:2302/daniel/dotfiles-generator

This commit is contained in:
Daniel_I_Am 2022-06-04 00:30:48 +02:00
commit c48a2f027f

View File

@ -218,9 +218,12 @@ EOS
index=$(docker ps -a --filter "name=docker-env-$image_repository-*" --format '{% raw %}{{.Names}}{% endraw %}' | perl -e 'my $max = 0; while (<>) {my ($n) = $_ =~ /(\d+)$/; if ($n > $max) { $max = $n };}; print $max+1;')
name="docker-env-$image_repository-$index"
run_command="docker run --rm -it --name \"$name\" -v $(pwd):/work_dir "
run_command="docker run --rm -it --name \"$name\" -v \"$(pwd):/work_dir\" "
run_command+="${run_command_switches[*]}"
for run_command_switch in $run_command_switches
do
run_command+="\"$run_command_switch\" "
done
run_command+="-w \"$workdir\" \"$image\" $cmd"
@ -240,8 +243,8 @@ function _docker-env() {
"-h[Container host name]" \
"-m[Memory limit]" \
"-u[Username or UID (format: (<name|uid>|(<name|uid>:<group|gid>)))]" \
"(-p -e -v -w)--[Explicitely stop switches and start positional arguments]" \
"(-p -e -v -w --)1:Container image:->image" \
"(-p -e -v -w -h -m -u)--[Explicitely stop switches and start positional arguments]" \
"(-p -e -v -w -h -m -u --)1:Container image:->image" \
"*:Container CMD:->cmd"
case $state in