summaryrefslogtreecommitdiff
path: root/functions/cache.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:49 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commitda353a5231ad925013d01065768864307c70651a (patch)
tree589606906e4e8966797f352ec63162cbb4016da0 /functions/cache.sh
parent068a51b175546dfeac45c747236817cb41db50d7 (diff)
downloadvyos-live-build-da353a5231ad925013d01065768864307c70651a.tar.gz
vyos-live-build-da353a5231ad925013d01065768864307c70651a.zip
Adding live-helper 1.0~a4-1.
Diffstat (limited to 'functions/cache.sh')
-rwxr-xr-xfunctions/cache.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/functions/cache.sh b/functions/cache.sh
index bffe1a3d4..a80245a27 100755
--- a/functions/cache.sh
+++ b/functions/cache.sh
@@ -11,21 +11,21 @@ set -e
Restore_cache ()
{
- CACHEDIRECTORY="${1}"
+ DIRECTORY="${1}"
if [ "${LH_CACHE}" = "enabled" ]
then
- if [ -d "${CACHEDIRECTORY}" ]
+ if [ -d "${DIRECTORY}" ]
then
# Restore old cache
- cp "${CACHEDIRECTORY}"/*.deb chroot/var/cache/apt/archives
+ cp "${DIRECTORY}"/*.deb chroot/var/cache/apt/archives
fi
fi
}
Save_cache ()
{
- CACHEDIRECTORY="${1}"
+ DIRECTORY="${1}"
if [ "${LH_CACHE}" = "enabled" ]
then
@@ -35,13 +35,13 @@ Save_cache ()
if ls chroot/var/cache/apt/archives/*.deb &> /dev/null
then
# Creating cache directory
- if [ ! -d "${CACHEDIRECTORY}" ]
+ if [ ! -d "${DIRECTORY}" ]
then
- mkdir -p "${CACHEDIRECTORY}"
+ mkdir -p "${DIRECTORY}"
fi
# Saving new cache
- mv -f chroot/var/cache/apt/archives/*.deb "${CACHEDIRECTORY}"
+ mv -f chroot/var/cache/apt/archives/*.deb "${DIRECTORY}"
fi
else
# Purging current cache