Skip to content

Instantly share code, notes, and snippets.

View ikhoon's full-sized avatar
🐱
Working from home

Ikhun Um ikhoon

🐱
Working from home
View GitHub Profile
@ikhoon
ikhoon / git-checkout-pr.sh
Last active May 4, 2023 09:30 — forked from trustin/git-checkout-pr.sh
git-checkout-pr.sh - fetches a Git pull request from the remote and creates a local branch for it
#!/usr/bin/env bash
set -Eeuo pipefail
log() {
echo -en '\033[1;32m'
echo -n "$@"
echo -e '\033[0m'
}
choice() {
#!/usr/bin/env bash
set -Eeuo pipefail
BREW='/opt/homebrew/bin/brew'
if [[ ! -x "$BREW" ]]; then
echo 'Install Homebrew first:'
echo
echo ' /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
echo
exit 1