Skip to content

Commit

Permalink
Merge pull request #17 from parasyte/fix/macos
Browse files Browse the repository at this point in the history
Fix shell script compatibility with macOS
  • Loading branch information
jethrogb authored May 1, 2019
2 parents 4bab33b + de8b72e commit 8e09f8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build-src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# commit-db.rb list-valid nightly|GIT_DIR=/your/rust/dir/.git ./build-src.sh

if [ $(uname) == 'Darwin' ]; then
alias tac='tail -f'
alias tac='tail -r'
fi

prompt_changes() {
Expand Down
6 changes: 3 additions & 3 deletions edit-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

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

bold_arrow; echo -e "Applying patch from \e[1;36m$TMP_PATCH\e[0m"
bold_arrow; echo -e "Applying patch from \033[1;36m$TMP_PATCH\033[0m"
patch -p1 < $TMP_PATCH || true
bold_arrow; echo -e "Make your changes now (\e[1;36mctrl-D\e[0m when finished)"
bold_arrow; echo -e "Make your changes now (\033[1;36mctrl-D\033[0m when finished)"
bash_diff_loop "No changes were made"
bold_arrow; echo "Replacing $IO_COMMIT.patch with updated version"
git diff > $TMP_PATCH
Expand Down
2 changes: 1 addition & 1 deletion functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ get_io_commits() {
}

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

prepare_version() {
Expand Down

0 comments on commit 8e09f8c

Please sign in to comment.