diff options
author | Daniel Baumann <daniel@debian.org> | 2010-09-26 11:55:07 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2010-09-26 11:55:07 +0200 |
commit | d47773e7d74d26c62d451e3ce950cdaf7749e09c (patch) | |
tree | 64ce640dd27515f65dd3cc6d852128d0ec10e392 | |
parent | 113ddd069dda19136bdd51d79eca25a8dfbee776 (diff) | |
download | vyos-live-build-d47773e7d74d26c62d451e3ce950cdaf7749e09c.tar.gz vyos-live-build-d47773e7d74d26c62d451e3ce950cdaf7749e09c.zip |
Updating.tmp-cache
-rwxr-xr-x | functions/cache.sh | 5 | ||||
-rwxr-xr-x | functions/exit.sh | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/functions/cache.sh b/functions/cache.sh index bae606dd2..72e6d5d15 100755 --- a/functions/cache.sh +++ b/functions/cache.sh @@ -25,6 +25,9 @@ Restore_cache () # without hardlinks cp "${DIRECTORY}"/*.deb chroot/var/cache/apt/archives fi + + mkdir -p .stage + touch .stage/cache_$(echo ${DIRECTORY} | sed -e 's|/|_|g') fi fi } @@ -58,4 +61,6 @@ Save_cache () # Purging current cache rm -f chroot/var/cache/apt/archives/*.deb fi + + rm -f .stage/cache_$(echo ${DIRECTORY} | sed -e 's|/|_|g') } diff --git a/functions/exit.sh b/functions/exit.sh index 5fa1fa86f..575da9b5a 100755 --- a/functions/exit.sh +++ b/functions/exit.sh @@ -35,6 +35,14 @@ Exit () done fi + # Saving package cache + if ls .stage/cache_* > /dev/null 2>&1 + then + _CACHE="$(basename .stage/cache_* | sed -e 's|cache_||' -e 's|_|/|g')" + + Save_cache ${_CACHE} + fi + return ${VALUE} } |