Skip to content

Commit

Permalink
upload up file
Browse files Browse the repository at this point in the history
  • Loading branch information
bamjun committed May 5, 2024
1 parent 5f50ad7 commit 3d302c2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# curl 에서 사용하기

```bash
curl https://bamjun.github.io/q/
curl https://bamjun.github.io/q/
```


```bash
curl -s https://bamjun.github.io/q/ | bash
```

![alt text](images/markdown-image.png)



- up 파일 다운받기

```bash
curl -o up https://bamjun.github.io/q/up
```

Binary file added images/markdown-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions up
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

# 변경된 파일들을 스테이징 영역에 추가
git add .

# 변경 사항이 있는지 확인하고 커밋 메시지를 받음
echo "커밋 메시지를 입력하세요:"
read index

# `git status` 명령어의 결과를 변수에 저장
status=$(git status)

# "working tree clean"이 포함되어 있으면 변경 사항이 없는 것으로 판단
if [[ $status == *"working tree clean"* ]]; then
echo "변경 사항이 없어 커밋할 내용이 없습니다."
else
# 변경 사항이 있으면 커밋을 수행
if [ -z "$index" ]; then
echo "커밋 메시지가 입력되지 않았습니다."
else
git commit -m "$index"
git push
fi
fi

0 comments on commit 3d302c2

Please sign in to comment.