-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: consistent formatting of bin scripts
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
- Loading branch information
1 parent
e60b969
commit d0f455e
Showing
11 changed files
with
346 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
function log() { echo "--- $1"; } | ||
log() { echo "--- $1"; } | ||
|
||
function merge { | ||
log "pulling any changes on branch" | ||
git pull --rebase | ||
log "cherry-picking commit: $1" | ||
git cherry-pick -x "$1" | ||
git status | ||
merge() { | ||
log "pulling any changes on branch" | ||
git pull --rebase | ||
log "cherry-picking commit: $1" | ||
git cherry-pick -x "$1" | ||
git status | ||
|
||
echo "Proceed with commit? (y/N):" | ||
read XN | ||
echo "Proceed with commit? (y/N):" | ||
read XN | ||
|
||
if [ "$XN" = "y" ]; then | ||
log "committing" | ||
git push origin | ||
else | ||
log "user aborted cherry-picking commit" | ||
exit | ||
fi | ||
if [ "$XN" = "y" ]; then | ||
log "committing" | ||
git push origin | ||
else | ||
log "user aborted cherry-picking commit" | ||
exit | ||
fi | ||
} | ||
|
||
if [ ! -n "$1" ]; then | ||
echo "Usage: cherrypick.sh <hash> [<branch1> <branch2> <branch3> ...]" | ||
echo | ||
echo "e.g. cherrypick.sh fb5cfe1cf2165abee 1.0.0 1.1.0 1.2.0" | ||
exit | ||
echo "Usage: cherrypick.sh <hash> [<branch1> <branch2> <branch3> ...]" | ||
echo | ||
echo "e.g. cherrypick.sh fb5cfe1cf2165abee 1.0.0 1.1.0 1.2.0" | ||
exit | ||
fi | ||
|
||
if [ ! -n "$2" ]; then | ||
log "cherry-picking to current branch" | ||
merge "$1" | ||
log "cherry-picking to current branch" | ||
merge "$1" | ||
else | ||
for arg in "${@:2}"; do | ||
git checkout "$arg" | ||
merge "$1" | ||
done | ||
for arg in "${@:2}"; do | ||
git checkout "$arg" | ||
merge "$1" | ||
done | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.