Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hust-x86-simulator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yizhiran
hust-x86-simulator
Commits
cf187cbe
There was an error fetching the commit references. Please try again later.
Commit
cf187cbe
authored
5 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
Add reverse proxy support
parent
51df4614
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+3
-3
3 additions, 3 deletions
Makefile
recover.sh
+7
-2
7 additions, 2 deletions
recover.sh
setup.sh
+7
-2
7 additions, 2 deletions
setup.sh
submit.sh
+6
-1
6 additions, 1 deletion
submit.sh
with
23 additions
and
8 deletions
Makefile
+
3
−
3
View file @
cf187cbe
...
@@ -11,13 +11,13 @@ clean:
...
@@ -11,13 +11,13 @@ clean:
submit
:
clean
submit
:
clean
git gc
git gc
STUID
=
$(
STUID
)
STUNAME
=
$(
STUNAME
)
bash submit.sh
STUID
=
$(
STUID
)
STUNAME
=
$(
STUNAME
)
hust_submit_server_host
=
cernet.cnm.cool
bash submit.sh
setup
:
setup
:
STUID
=
$(
STUID
)
STUNAME
=
$(
STUNAME
)
bash setup.sh
STUID
=
$(
STUID
)
STUNAME
=
$(
STUNAME
)
hust_submit_server_host
=
cernet.cnm.cool
bash setup.sh
recover
:
recover
:
STUID
=
$(
STUID
)
STUNAME
=
$(
STUNAME
)
bash recover.sh
STUID
=
$(
STUID
)
STUNAME
=
$(
STUNAME
)
hust_submit_server_host
=
cernet.cnm.cool
bash recover.sh
.PHONY
:
default clean submit
.PHONY
:
default clean submit
This diff is collapsed.
Click to expand it.
recover.sh
+
7
−
2
View file @
cf187cbe
# Recolic CERNET proxy service:
# dssl.cun.io is not available in public Internet. So you have to use my proxy: cernet.cnm.cool.
# If variable is not set, use original version.
[
"
$hust_submit_server_host
"
=
""
]
&&
hust_submit_server_host
=
dssl.cun.io
function
env_set
()
{
function
env_set
()
{
sed
-i
-e
"/^export
$2
=.*/d"
~/.bashrc
sed
-i
-e
"/^export
$2
=.*/d"
~/.bashrc
echo
"export
$2
=
`
readlink
-e
$1
`
"
>>
~/.bashrc
echo
"export
$2
=
`
readlink
-e
$1
`
"
>>
~/.bashrc
...
@@ -6,10 +11,10 @@ function env_set() {
...
@@ -6,10 +11,10 @@ function env_set() {
[
-z
${
STUID
}
]
&&
echo
"STUID must be set (RTFM)"
&&
exit
[
-z
${
STUID
}
]
&&
echo
"STUID must be set (RTFM)"
&&
exit
[
-z
${
STUNAME
}
]
&&
echo
"STUNAME must be set (RTFM)"
&&
exit
[
-z
${
STUNAME
}
]
&&
echo
"STUNAME must be set (RTFM)"
&&
exit
echo
"uploading public key..."
echo
"uploading public key..."
curl
-F
"id=
${
STUID
}
"
-F
"name=
${
STUNAME
}
"
-F
"file=@
${
HOME
}
/.ssh/id_rsa.pub"
https://
dssl.cun.io
/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
sleep
2
echo
"recover from remote git..."
echo
"recover from remote git..."
git remote add hustpa pa@
dssl.cun.io
:
${
STUID
}
-git
git remote add hustpa
"
pa@
$hust_submit_server_host
:
${
STUID
}
-git
"
git fetch hustpa
git fetch hustpa
git branch
-d
pa0
git branch
-d
pa0
git branch
-d
pa1
git branch
-d
pa1
...
...
This diff is collapsed.
Click to expand it.
setup.sh
+
7
−
2
View file @
cf187cbe
# Recolic CERNET proxy service:
# dssl.cun.io is not available in public Internet. So you have to use my proxy: cernet.cnm.cool.
# If variable is not set, use original version.
[
"
$hust_submit_server_host
"
=
""
]
&&
hust_submit_server_host
=
dssl.cun.io
function
env_set
()
{
function
env_set
()
{
sed
-i
-e
"/^export
$2
=.*/d"
~/.bashrc
sed
-i
-e
"/^export
$2
=.*/d"
~/.bashrc
echo
"export
$2
=
`
readlink
-e
$1
`
"
>>
~/.bashrc
echo
"export
$2
=
`
readlink
-e
$1
`
"
>>
~/.bashrc
...
@@ -6,10 +11,10 @@ function env_set() {
...
@@ -6,10 +11,10 @@ function env_set() {
[
-z
${
STUID
}
]
&&
echo
"STUID must be set (RTFM)"
&&
exit
[
-z
${
STUID
}
]
&&
echo
"STUID must be set (RTFM)"
&&
exit
[
-z
${
STUNAME
}
]
&&
echo
"STUNAME must be set (RTFM)"
&&
exit
[
-z
${
STUNAME
}
]
&&
echo
"STUNAME must be set (RTFM)"
&&
exit
echo
"uploading public key..."
echo
"uploading public key..."
curl
-F
"id=
${
STUID
}
"
-F
"name=
${
STUNAME
}
"
-F
"file=@
${
HOME
}
/.ssh/
id_rsa
.pub"
https://
dssl.cun.io
/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
sleep
2
echo
"setup git-remote..."
echo
"setup git-remote..."
git remote add hustpa pa@
dssl.cun.io
:
${
STUID
}
-git
git remote add hustpa
"
pa@
$hust_submit_server_host
:
${
STUID
}
-git
"
git branch pa0
git branch pa0
git branch pa1
git branch pa1
git branch pa2
git branch pa2
...
...
This diff is collapsed.
Click to expand it.
submit.sh
+
6
−
1
View file @
cf187cbe
# Recolic CERNET proxy service:
# dssl.cun.io is not available in public Internet. So you have to use my proxy: cernet.cnm.cool.
# If variable is not set, use original version.
[
"
$hust_submit_server_host
"
=
""
]
&&
hust_submit_server_host
=
dssl.cun.io
set
-e
set
-e
[
-z
${
STUID
}
]
&&
echo
"STUID must be set (RTFM)"
&&
exit
[
-z
${
STUID
}
]
&&
echo
"STUID must be set (RTFM)"
&&
exit
...
@@ -8,7 +13,7 @@ read task
...
@@ -8,7 +13,7 @@ read task
cwd
=
${
PWD
##*/
}
cwd
=
${
PWD
##*/
}
echo
"
${
STUID
}
(
${
STUNAME
}
) submitting
${
task
}
..."
echo
"
${
STUID
}
(
${
STUNAME
}
) submitting
${
task
}
..."
wiki
=
'
https://
dssl.cun.io
/teach/api/uploads/
'
wiki
=
"
https://
$hust_submit_server_host
/teach/api/uploads/
"
tarball
=
$(
mktemp
-q
)
.tar.bz2
tarball
=
$(
mktemp
-q
)
.tar.bz2
bash
-c
"cd .. && tar cj
${
cwd
}
>
${
tarball
}
"
bash
-c
"cd .. && tar cj
${
cwd
}
>
${
tarball
}
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment