Skip to content

Commit 0d78a5b

Browse files
authored
Merge pull request #43 from andstor/develop
v3.2.2
2 parents f78bae4 + f37cc23 commit 0d78a5b

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org).
66

77
## [Unreleased]
88

9+
## [3.2.2] - 2020-06-13
10+
### Fixed
11+
- Proper handling of spaces in path names.
12+
913
## [3.2.1] - 2020-04-21
1014
### Fixed
1115
- Fixed an error regarding creation of destination branches.
@@ -42,7 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org).
4246

4347
## 1.0.0 - 2019-07-09
4448

45-
[Unreleased]: https://github.com/andstor/copycat-action/compare/v3.2.1...HEAD
49+
[Unreleased]: https://github.com/andstor/copycat-action/compare/v3.2.2...HEAD
50+
[3.2.2]: https://github.com/andstor/copycat-action/compare/v3.2.1...v3.2.2
4651
[3.2.1]: https://github.com/andstor/copycat-action/compare/v3.2.0...v3.2.1
4752
[3.2.0]: https://github.com/andstor/copycat-action/compare/v3.1.1...v3.2.0
4853
[3.1.1]: https://github.com/andstor/copycat-action/compare/v3.1.0...v3.1.1

entrypoint.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22
#
33
# @author André Storhaug <andr3.storhaug@gmail.com>
4-
# @date 2020-04-18
4+
# @date 2020-06-13
55
# @license MIT
6-
# @version 3.2.1
6+
# @version 3.2.2
77

88
set -o pipefail
99

@@ -98,15 +98,18 @@ if [[ -n "$FILTER" ]]; then
9898
mkdir ${temp_dir}/${SRC_REPO_NAME}
9999
cd ${SRC_REPO_NAME}
100100
FINAL_SOURCE="${tmp_dir}/${SRC_REPO_NAME}/${SRC_PATH}"
101+
SAVEIFS=$IFS
102+
IFS=$(echo -en "\n\b")
101103
for f in ${FILTER} ; do
102104
[ -e "$f" ] || continue
103105
[ -d "$f" ] && continue
104106
if [[ -n "$EXCLUDE" ]] ; then
105-
[[ $f == $EXCLUDE ]] && continue
107+
[[ "$f" == $EXCLUDE ]] && continue
106108
fi
107109
file_dir=$(dirname "${f}")
108-
mkdir -p ${tmp_dir}/${SRC_REPO_NAME}/${file_dir} && cp "${f}" ${tmp_dir}/${SRC_REPO_NAME}/${file_dir}
110+
mkdir -p "${tmp_dir}/${SRC_REPO_NAME}/${file_dir}" && cp "${f}" "${tmp_dir}/${SRC_REPO_NAME}/${file_dir}"
109111
done
112+
IFS=$SAVEIFS
110113
cd ..
111114
fi
112115

@@ -127,16 +130,16 @@ fi
127130

128131
if [ "$CLEAN" = "true" ]; then
129132
if [ -f "${DST_REPO_NAME}/${DST_PATH}" ] ; then
130-
find ${DST_REPO_NAME}/${DST_PATH} -type f -not -path '*/\.git/*' -delete
133+
find "${DST_REPO_NAME}/${DST_PATH}" -type f -not -path '*/\.git/*' -delete
131134
elif [ -d "${DST_REPO_NAME}/${DST_PATH}" ] ; then
132-
find ${DST_REPO_NAME}/${DST_PATH%/*}/* -type f -not -path '*/\.git/*' -delete
135+
find "${DST_REPO_NAME}/${DST_PATH%/*}"/* -type f -not -path '*/\.git/*' -delete
133136
else
134137
echo >&2 "Nothing to clean 🧽"
135138
fi
136139
fi
137140

138-
mkdir -p ${DST_REPO_NAME}/${DST_PATH%/*} || exit "$?"
139-
cp -rf ${FINAL_SOURCE} ${DST_REPO_NAME}/${DST_PATH} || exit "$?"
141+
mkdir -p "${DST_REPO_NAME}/${DST_PATH%/*}" || exit "$?"
142+
cp -rf "${FINAL_SOURCE}" "${DST_REPO_NAME}/${DST_PATH}" || exit "$?"
140143
cd ${DST_REPO_NAME} || exit "$?"
141144

142145
if [[ -z "${COMMIT_MESSAGE}" ]]; then

0 commit comments

Comments
 (0)