summaryrefslogtreecommitdiff
path: root/utils/installer/install.sh
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-09-21 11:56:24 +0200
committerGitHub <[email protected]>2021-09-21 11:56:24 +0200
commit938e0f88bc3c27ce019470e0279233a373df61ef (patch)
treeed637a8737651673a8dae6c99e36b8b525464365 /utils/installer/install.sh
parent55d9a15a088d688627426b034f4b71aa86a8ce9e (diff)
fix: remove outdated cache files on install (#1591)
Diffstat (limited to 'utils/installer/install.sh')
-rwxr-xr-xutils/installer/install.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/installer/install.sh b/utils/installer/install.sh
index 52d36581..1bbb05c4 100755
--- a/utils/installer/install.sh
+++ b/utils/installer/install.sh
@@ -318,7 +318,23 @@ EOF
chmod +x "$INSTALL_PREFIX/bin/lvim"
}
+function remove_old_cache_files() {
+ local packer_cache="$LUNARVIM_CONFIG_DIR/plugin/packer_compiled.lua"
+ if [ -e "$packer_cache" ]; then
+ echo "Removing old packer cache file"
+ rm -f "$packer_cache"
+ fi
+
+ if [ -e "$LUNARVIM_CACHE_DIR/luacache" ] || [ -e "$LUNARVIM_CACHE_DIR/lvim_cache" ]; then
+ echo "Removing old startup cache file"
+ rm -f "$LUNARVIM_CACHE_DIR/{luacache,lvim_cache}"
+ fi
+}
+
function setup_lvim() {
+
+ remove_old_cache_files
+
echo "Installing LunarVim shim"
setup_shim