Last active
May 3, 2025 15:31
-
-
Save CreatiCoding/116f8369f1e8522ceae24936c7b54c82 to your computer and use it in GitHub Desktop.
cli.sh
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # macOS인지 확인 | |
| if [[ "$OSTYPE" != "darwin"* ]]; then | |
| echo "이 스크립트는 macOS에서만 실행됩니다." | |
| exit 1 | |
| fi | |
| # wget 설치 여부 확인 | |
| if ! command -v wget >/dev/null 2>&1; then | |
| echo "wget이 설치되어 있지 않습니다. 설치를 시작합니다." | |
| # Homebrew 설치 여부 확인 | |
| if ! command -v brew >/dev/null 2>&1; then | |
| echo "Homebrew가 설치되어 있지 않습니다. 먼저 Homebrew를 설치해주세요." | |
| echo "설치 방법: https://brew.sh/" | |
| exit 1 | |
| fi | |
| # wget 설치 | |
| brew install wget | |
| fi | |
| BASE_URL="https://gist.github.com/CreatiCoding" | |
| [ "$1" = "hello" ] && TARGET="/7ccff9cbbaa001491bd31598a8412d32/raw/e288d9d7380cc9e024632bae56afaa7a172d6c1c/scripts.sh" | |
| [ "$1" = "ssh-gen" ] && TARGET="/32fc7e2476d98562e03a5950825d5396/raw/f55479cf3b4a9f1e7ae1620594c2911dbda07160/scripts.sh" | |
| [ "$1" = "react-hook-form-ko" ] && TARGET="/344d2c8aa989707d16c8d46d98bc2c5c/raw/231333a336a3de9c4e0f2467b5501f4c6b324094/scripts.sh" | |
| echo $1 | |
| echo "-------------------------" | |
| echo "$BASE_URL$TARGET" | |
| curl $BASE_URL$TARGET | |
| echo "-------------------------" | |
| shift; | |
| wget -qO- "$BASE_URL$TARGET" | bash -s "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment