apt-docker
340 Bytes
#!/bin/bash
set -e
declare -a cmd
apt-get update
export DEBIAN_FRONTEND=noninteractive RUNLEVEL=1
while [[ $# -gt 0 ]]; do
if [[ $1 = ";" ]]; then
apt-get "${cmd[@]}"
cmd=()
else
cmd+=("$1")
fi
shift
done
if [[ ${#cmd[*]} -gt 0 ]]; then
apt-get "${cmd[@]}"
cmd=()
fi
rm -rf /var/lib/apt/lists/ /var/cache/apt/archives/*.deb