diff --git a/imagefiles/install-crosstool-ng-toolchain.sh b/imagefiles/install-crosstool-ng-toolchain.sh index f343882..098fe42 100755 --- a/imagefiles/install-crosstool-ng-toolchain.sh +++ b/imagefiles/install-crosstool-ng-toolchain.sh @@ -79,6 +79,9 @@ if [ ${REV} = "crosstool-ng-1.23.0" ]; then patch scripts/build/companion_libs/210-expat.sh -i /dockcross/crosstool-ng-expat.patch # Patch to fix error with bash 5 and up: https://github.com/pfalcon/esp-open-sdk/issues/365 patch configure.ac -i /dockcross/Fix-error-with-bash-5-and-up.patch + # Clean patch + rm /dockcross/Fix-error-with-bash-5-and-up.patch + rm /dockcross/crosstool-ng-expat.patch fi # Bootstrap and install the tool. diff --git a/imagefiles/install-python-packages.sh b/imagefiles/install-python-packages.sh index 088a4e7..2c7b3e0 100755 --- a/imagefiles/install-python-packages.sh +++ b/imagefiles/install-python-packages.sh @@ -29,3 +29,5 @@ rm get-pip.py ${PYTHON} -m pip install --upgrade --ignore-installed setuptools ${PYTHON} -m pip install --ignore-installed conan +# Purge cache to save space: https://stackoverflow.com/questions/37513597/is-it-safe-to-delete-cache-pip-directory +${PYTHON} -m pip cache purge diff --git a/tools/container-diff.sh b/tools/container-diff.sh new file mode 100755 index 0000000..d4c860d --- /dev/null +++ b/tools/container-diff.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -euo pipefail + +# More info: https://github.com/GoogleContainerTools/container-diff + +if (( $# < 1 || $# > 2 )); then + echo "Need 1 or 2 arguments: " + exit 1 +fi + +if (( $# == 1 )); then + container-diff analyze $1 --type=history 2>&1 | tee -a analyze-history.txt + container-diff analyze $1 --type=file 2>&1 | tee -a analyze-file.txt + container-diff analyze $1 --type=size 2>&1 | tee -a analyze-size.txt + container-diff analyze $1 --type=apt 2>&1 | tee -a analyze-apt.txt + container-diff analyze $1 --type=pip 2>&1 | tee -a analyze-pip.txt + +fi + +if (( $# == 2 )); then + container-diff diff $1 $2 --type=history 2>&1 | tee -a diff-history.txt + container-diff diff $1 $2 --type=file 2>&1 | tee -a diff-file.txt + container-diff diff $1 $2 --type=size 2>&1 | tee -a diff-size.txt + container-diff diff $1 $2 --type=apt 2>&1 | tee -a diff-apt.txt + container-diff diff $1 $2 --type=pip 2>&1 | tee -a diff-pip.txt +fi