From 092304d9e0ccc37cc0ddaa9b136457e56a1cac20 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 12 Oct 2025 11:47:26 -0500 Subject: changing repositories --- scripts/delete-elisp-compiled-files.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/delete-elisp-compiled-files.sh (limited to 'scripts/delete-elisp-compiled-files.sh') diff --git a/scripts/delete-elisp-compiled-files.sh b/scripts/delete-elisp-compiled-files.sh new file mode 100755 index 00000000..b64a6540 --- /dev/null +++ b/scripts/delete-elisp-compiled-files.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +location=$HOME/.emacs.d/ + +echo ""; echo "You are about to delete emacs lisp compiled files (.eln and .elc) recursively from $location"; + +# Show the files it will delete +echo "The following files will be deleted:" +find $location -type f \( -name "*.eln" -o -name "*.elc" \) -print + + +echo ""; echo "" +read -p "Are you sure you want to continue? (y/n) " -n 1 -r +echo # move to a new line +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deleting files..." + find $location -type f \( -name "*.eln" -o -name "*.elc" \) -exec rm -f {} + + echo "Files deleted." +else + echo "Operation cancelled." +fi + +echo ""; echo "" -- cgit v1.2.3