Commit b56661fe by Stéphane Graber

lxc-download: Tweak cache location

- Also include the variant in the path - Fix invalid LXC_CACHE_BASE - Drop redundant code Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 6849cb5b
...@@ -327,15 +327,15 @@ fi ...@@ -327,15 +327,15 @@ fi
# Setup the cache # Setup the cache
if [ "$DOWNLOAD_MODE" = "system" ]; then if [ "$DOWNLOAD_MODE" = "system" ]; then
LXC_CACHE_BASE="$LOCALSTATEDIR/cache/" LXC_CACHE_BASE="$LOCALSTATEDIR/cache/lxc/"
LXC_CACHE_PATH="$LOCALSTATEDIR/cache/lxc/download/$DOWNLOAD_DIST"
LXC_CACHE_PATH="$LXC_CACHE_PATH/$DOWNLOAD_RELEASE/$DOWNLOAD_ARCH"
else else
LXC_CACHE_BASE="$HOME/.cache/lxc/" LXC_CACHE_BASE="$HOME/.cache/lxc/"
LXC_CACHE_PATH="$HOME/.cache/lxc/download/$DOWNLOAD_DIST"
LXC_CACHE_PATH="$LXC_CACHE_PATH/$DOWNLOAD_RELEASE/$DOWNLOAD_ARCH"
fi fi
LXC_CACHE_PATH="$LXC_CACHE_BASE/download/$DOWNLOAD_DIST"
LXC_CACHE_PATH="$LXC_CACHE_PATH/$DOWNLOAD_RELEASE/$DOWNLOAD_ARCH/"
LXC_CACHE_PATH="$LXC_CACHE_PATH/$DOWNLOAD_VARIANT"
if [ -d "$LXC_CACHE_PATH" ]; then if [ -d "$LXC_CACHE_PATH" ]; then
if [ "$DOWNLOAD_FLUSH_CACHE" = "true" ]; then if [ "$DOWNLOAD_FLUSH_CACHE" = "true" ]; then
echo "Flushing the cache..." echo "Flushing the cache..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment