From 70b3f4bd2f48f8acc87bdc5e34c8889aa22d1fe2 Mon Sep 17 00:00:00 2001
From: Recolic Keghart <root@recolic.net>
Date: Fri, 13 Dec 2019 18:11:06 +0800
Subject: [PATCH] better script

---
 .gitignore | 7 -------
 recover.sh | 1 +
 setup.sh   | 1 +
 submit.sh  | 1 +
 4 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index c986ee5..e69de29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +0,0 @@
-*.*
-*
-!*/
-!Makefile
-!README.md
-!.gitignore
-!init.sh
diff --git a/recover.sh b/recover.sh
index 75b382f..e801053 100644
--- a/recover.sh
+++ b/recover.sh
@@ -11,6 +11,7 @@ function env_set() {
 [ -z ${STUID} ]   && echo "STUID must be set (RTFM)"   && exit
 [ -z ${STUNAME} ] && echo "STUNAME must be set (RTFM)" && exit
 echo "uploading public key..."
+echo curl -F "id=${STUID}" -F "name=${STUNAME}" -F "file=@${HOME}/.ssh/id_rsa.pub" "https://$hust_submit_server_host/teach/api/uploads/pasetup"
 curl -F "id=${STUID}" -F "name=${STUNAME}" -F "file=@${HOME}/.ssh/id_rsa.pub" "https://$hust_submit_server_host/teach/api/uploads/pasetup"
 sleep 2
 echo "recover from remote git..."
diff --git a/setup.sh b/setup.sh
index 110c3eb..2f72f4c 100644
--- a/setup.sh
+++ b/setup.sh
@@ -11,6 +11,7 @@ function env_set() {
 [ -z ${STUID} ]   && echo "STUID must be set (RTFM)"   && exit
 [ -z ${STUNAME} ] && echo "STUNAME must be set (RTFM)" && exit
 echo "uploading public key..."
+echo curl -F "id=${STUID}" -F "name=${STUNAME}" -F "file=@${HOME}/.ssh/RecolicPC.pub" "https://$hust_submit_server_host/teach/api/uploads/pasetup"
 curl -F "id=${STUID}" -F "name=${STUNAME}" -F "file=@${HOME}/.ssh/RecolicPC.pub" "https://$hust_submit_server_host/teach/api/uploads/pasetup"
 sleep 2
 echo "setup git-remote..."
diff --git a/submit.sh b/submit.sh
index 380b664..9e549cd 100644
--- a/submit.sh
+++ b/submit.sh
@@ -17,4 +17,5 @@ wiki="https://$hust_submit_server_host/teach/api/uploads/"
 
 tarball=$(mktemp -q).tar.bz2
 bash -c "cd .. && tar cj ${cwd} > ${tarball}"
+echo curl -F "task=${task}" -F "id=${STUID}" -F "name=${STUNAME}" -F "submission=@${tarball}" ${wiki}upload
 curl -F "task=${task}" -F "id=${STUID}" -F "name=${STUNAME}" -F "submission=@${tarball}" ${wiki}upload
-- 
GitLab