Skip to content

Commit 7a882f5

Browse files
authored
Merge pull request #17 from TeemuSailynoja/use-package-name-placeholder
Replace `package_name` placeholder.
2 parents 2626778 + 766b0c7 commit 7a882f5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package_name/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Various utility functions, for use outside of the `package_name` module.
33
4-
Do not add any functions here that gets imported into the `synthetic_consumers` module.
5-
If you need to add logic that gets imported into the `synthetic_consumers` module,
4+
Do not add any functions here that gets imported into the `package_name` module.
5+
If you need to add logic that gets imported into the `package_name` module,
66
add it to another file in this directory where it logically belongs. If none such file
77
exists, create a new file in this directory.
88

setup.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ name=$(basename "$(pwd)" | tr '-' '_')
7575

7676
find . -type f -not -path '*/\.*' -not -name 'setup.sh' -exec sh -c '
7777
if file -b --mime-type "$1" | grep -q "^text/"; then
78-
sed -i "" "s/$2/$3/g" "$1"
78+
if [ "$(uname)" = "Darwin" ]; then
79+
# macOS (BSD sed)
80+
sed -i "" "s/$2/$3/g" "$1"
81+
else
82+
# Linux (GNU sed)
83+
sed -i "s/$2/$3/g" "$1"
84+
fi
7985
fi
8086
' sh {} "$current_name" "$name" \;
8187

0 commit comments

Comments
 (0)