Skip to content

Commit

Permalink
fixups after reviewer comments
Browse files Browse the repository at this point in the history
use ".<filetype>" instead of "<filetype>" when echoing their deletion.
add comment explaining why wildcard deletion of files is not used.
  • Loading branch information
edibotopic committed Sep 16, 2024
1 parent e4086d8 commit 20654fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,15 @@ echo "Copying contents to the installation directory..."
cp -R "$temp_directory"/sp-files/* "$temp_directory"/sp-files/.??* "$install_directory"

# Delete files with unpreferred filetype in the installation directory
# No wildcard delete to avoid data loss if user Git-inits in dir with pre-existing files
if [ -z "${default_filetype_choice:-}" ]; then
echo "Default filetype not defined, so proceed with deleting unpreferred filetype."
if [ "$file_type" = 'md' ]; then
echo "Deleting rst files..."
echo "Deleting .rst files..."
rm "$install_directory"/doc-cheat-sheet.rst
rm "$install_directory"/index.rst
else
echo "Deleting md files..."
echo "Deleting .md files..."
rm "$install_directory"/doc-cheat-sheet-myst.md
rm "$install_directory"/index.md
fi
Expand Down

0 comments on commit 20654fd

Please sign in to comment.