|
|
|
@ -19,27 +19,53 @@ srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
|
|
|
|
|
. "$srcdir/docker.sh"
|
|
|
|
|
|
|
|
|
|
# Caches we want to check have been removed:
|
|
|
|
|
#
|
|
|
|
|
# .cache => Python pip
|
|
|
|
|
#
|
|
|
|
|
# .cpan => Perl
|
|
|
|
|
# .cpanm
|
|
|
|
|
#
|
|
|
|
|
# .gem => Ruby
|
|
|
|
|
#
|
|
|
|
|
# Java / Scala / Groovy:
|
|
|
|
|
#
|
|
|
|
|
# .gradle => Gradle
|
|
|
|
|
# .groovy => Groovy
|
|
|
|
|
# .ivy => Ivy (Sbt / Gradle)
|
|
|
|
|
# .ivy2
|
|
|
|
|
# .m2 => Maven
|
|
|
|
|
# .sbt => SBT
|
|
|
|
|
|
|
|
|
|
cache_list="
|
|
|
|
|
.cache
|
|
|
|
|
.cpan
|
|
|
|
|
.cpanm
|
|
|
|
|
.gem
|
|
|
|
|
.gradle
|
|
|
|
|
.groovy
|
|
|
|
|
.ivy
|
|
|
|
|
.ivy2
|
|
|
|
|
.m2
|
|
|
|
|
.sbt
|
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
if is_inside_docker; then
|
|
|
|
|
# Python pip => .cache
|
|
|
|
|
# Perl => .cpan / .cpanm
|
|
|
|
|
# Ruby => .gem
|
|
|
|
|
# Java / Scala / Groovy:
|
|
|
|
|
# Maven => .m2
|
|
|
|
|
# Ivy => .ivy .ivy2
|
|
|
|
|
# (Sbt / Gradle)
|
|
|
|
|
for x in \
|
|
|
|
|
.cache \
|
|
|
|
|
.cpan \
|
|
|
|
|
.cpanm \
|
|
|
|
|
.m2 \
|
|
|
|
|
.ivy \
|
|
|
|
|
.ivy2 \
|
|
|
|
|
; do
|
|
|
|
|
for y in /root ~; do
|
|
|
|
|
# This might fail if we're not running as root :-/
|
|
|
|
|
# consider sudo'ing and find / -type d -name $x but that might find .cache under some app or something, although we should probably remove that too
|
|
|
|
|
# for now this is good enough as most dockers are built as root
|
|
|
|
|
# should test for sudo availability as well
|
|
|
|
|
if [ -e "$y/$x" ]; then
|
|
|
|
|
echo "$y/$x detected, should have been removed from docker build"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
if [ -n "$(find / -type f -name pytools_checks)" ]; then
|
|
|
|
|
echo "pytools_checks detected, should have been removed from docker build"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|