-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_push.sh
More file actions
executable file
·56 lines (47 loc) · 1.13 KB
/
git_push.sh
File metadata and controls
executable file
·56 lines (47 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
number='2'
while [ $number != '1' ]
do
echo "문제 정보를 입력해주세요."
read prob
echo "$prob 이(가) 맞습니까?"
echo "[1: 예 / 2: 아니오]"
read number
done
number='2'
while [ $number != '1' ]
do
echo "카테고리를 입력해주세요."
read category
echo "$category 이(가) 맞습니까?"
echo "[1: 예 / 2: 아니오]"
read number
done
number='2'
while [ $number != '1' ]
do
echo "출처 사이트를 입력해주세요."
echo "1. BOJ"
echo "2. Codeforces"
read site_selection
if [ $site_selection == '1' ]
then
site="BOJ"
elif [ $site_selection == '2' ]
then
site="Codeforces"
else
echo "잘못된 입력입니다."
continue
fi
echo "$site 이(가) 맞습니까?"
echo "[1: 예 / 2: 아니오]"
read number
done
mkdir -p ./${site}/${category} && cp ./base.cpp ./${site}/${category}/${prob}.cpp
echo "${site}/${category}/${prob}.cpp에 저장되었습니다."
git add ./${site}/${category}/${prob}.cpp
git commit -m "${site}_${prob}"
git push origin main
echo "${site}/${category}/${prob}.cpp 파일 커밋이 완료되었습니다."
sh init.sh