Fixed problem deleting files starting with .git (e.g. .gitattributes)

This commit is contained in:
Carles Pina i Estany 2020-12-02 15:43:05 +00:00
parent 976916018a
commit 3d4da26ca5

View File

@ -28,7 +28,7 @@ ls -la "$CLONE_DIR"
echo "Cleaning destination repository of old files" echo "Cleaning destination repository of old files"
# Copy files into the git and deletes all git # Copy files into the git and deletes all git
find "$CLONE_DIR" | grep -v "^$CLONE_DIR/\.git" | grep -v "^$CLONE_DIR$" | xargs rm -rf # delete all files (to handle deletions) find "$CLONE_DIR" | grep -v "^$CLONE_DIR/\.git$" | grep -v "^$CLONE_DIR$" | xargs rm -rf # delete all files (to handle deletions)
ls -la "$CLONE_DIR" ls -la "$CLONE_DIR"
echo "Copying contents to git repo" echo "Copying contents to git repo"