diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh new file mode 100755 index 0000000000..b4db342cbe --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -euo pipefail + +rootfs=${1} + +# Remove test stuff from python - it's quite large. +for p in "${rootfs}"/usr/lib/python*; do + if [[ ! -d ${p} ]]; then + continue + fi + # find directories named tests or test and remove them (-prune + # avoids searching below those directories) + find "${p}" \( -name tests -o -name test \) -type d -prune -exec rm -rf '{}' '+' +done