Skip to content

Commit 8e09f8c

Browse files
authored
Merge pull request #17 from parasyte/fix/macos
Fix shell script compatibility with macOS
2 parents 4bab33b + de8b72e commit 8e09f8c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build-src.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# commit-db.rb list-valid nightly|GIT_DIR=/your/rust/dir/.git ./build-src.sh
55

66
if [ $(uname) == 'Darwin' ]; then
7-
alias tac='tail -f'
7+
alias tac='tail -r'
88
fi
99

1010
prompt_changes() {

edit-patches.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
prompt_changes() {
77
bold_arrow; echo "Editing $IO_COMMIT"
8-
bold_arrow; echo -e "Remember to test your changes with: \e[1;36mcargo build\e[0m"
8+
bold_arrow; echo -e "Remember to test your changes with: \033[1;36mcargo build\033[0m"
99

1010
local MAIN_GIT_DIR="$GIT_DIR"
1111
local GIT_DIR=./.git CORE_IO_COMMIT=$IO_COMMIT
@@ -18,9 +18,9 @@ prompt_changes() {
1818
patch -s -p1 < $PATCH_DIR/$IO_COMMIT.patch
1919
git commit -a -m "existing patch for $IO_COMMIT" > /dev/null
2020

21-
bold_arrow; echo -e "Applying patch from \e[1;36m$TMP_PATCH\e[0m"
21+
bold_arrow; echo -e "Applying patch from \033[1;36m$TMP_PATCH\033[0m"
2222
patch -p1 < $TMP_PATCH || true
23-
bold_arrow; echo -e "Make your changes now (\e[1;36mctrl-D\e[0m when finished)"
23+
bold_arrow; echo -e "Make your changes now (\033[1;36mctrl-D\033[0m when finished)"
2424
bash_diff_loop "No changes were made"
2525
bold_arrow; echo "Replacing $IO_COMMIT.patch with updated version"
2626
git diff > $TMP_PATCH

functions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ get_io_commits() {
3535
}
3636

3737
get_patch_commits() {
38-
find $PATCH_DIR -type f|xargs -n 1 basename|cut -d. -f1
38+
find $PATCH_DIR -type f -print0|xargs -0 -n 1 basename|cut -d. -f1
3939
}
4040

4141
prepare_version() {

0 commit comments

Comments
 (0)