fix(files): Deleting .gitkeep file when path is ending in / pt.2 (#285)
This commit is contained in:
commit
3b30283a6a
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ if [[ ${#FILES[@]} -gt 0 ]]; then
|
|||
fi
|
||||
echo "Copying $FILE to $DEST"
|
||||
cp -rf "$FILE"/* $DEST
|
||||
if [[ "${DEST}" =~ */ ]]; then
|
||||
if [[ "${DEST}" =~ *"/" ]] || [[ "${DEST}" == "/" ]]; then
|
||||
rm -f "${DEST}.gitkeep"
|
||||
else
|
||||
rm -f "${DEST}/.gitkeep"
|
||||
|
|
@ -49,7 +49,7 @@ if [[ ${#FILES[@]} -gt 0 ]]; then
|
|||
fi
|
||||
echo "Copying $FILE to $DEST"
|
||||
cp -f $FILE $DEST
|
||||
if [[ "${DEST}" =~ */ ]]; then
|
||||
if [[ "${DEST}" =~ *"/" ]] || [[ "${DEST}" == "/" ]]; then
|
||||
rm -f "${DEST}.gitkeep"
|
||||
else
|
||||
rm -f "${DEST}/.gitkeep"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue