Change file path
This commit is contained in:
parent
4304d7125d
commit
ebb0cabf9a
@ -37,8 +37,9 @@ class Exercice
|
||||
foreach($this->files as &$f)
|
||||
{
|
||||
$f["path_orig"] = $f["path"];
|
||||
$f["path_hash"] = hash("sha384", $f["path"])."/".basename($f["path"]);
|
||||
if (isset($VAR["files_dir"]))
|
||||
$f["path"] = $VAR["files_dir"].$f["path"];
|
||||
$f["path"] = $VAR["files_dir"].$f["path_hash"];
|
||||
$f["basename"] = basename($f["path"]);
|
||||
$f["sha1"] = strhex($f["sha1"]);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
{if file_exists($file['path'])}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/files/{$file['path_orig']}">
|
||||
<a href="/files/{$file['path_hash']}">
|
||||
<span class="glyphicon glyphicon-download"></span>
|
||||
</a>
|
||||
</td>
|
||||
|
10
synchro.sh
10
synchro.sh
@ -15,11 +15,11 @@ then
|
||||
OPTS="$OPTS --delete"
|
||||
fi
|
||||
|
||||
rsync -e ssh -av $OPTS out/errors phobos:~/
|
||||
rsync -e ssh -av $OPTS out/htdocs phobos:~/
|
||||
rsync -e ssh -av $OPTS out/teams phobos:~/
|
||||
rsync -e ssh -av $OPTS files phobos:~/
|
||||
rsync -e ssh -av $OPTS misc phobos:~/
|
||||
rsync -e ssh -av $OPTS out/errors phobos:~/
|
||||
rsync -e ssh -av $OPTS out/htdocs phobos:~/
|
||||
rsync -e ssh -av $OPTS out/teams phobos:~/
|
||||
rsync -e ssh -avL $OPTS files phobos:~/
|
||||
rsync -e ssh -av $OPTS misc phobos:~/
|
||||
scp nginx.conf submission.php phobos:~/
|
||||
|
||||
rsync -e ssh -av phobos:~/submission/ submission/
|
||||
|
Loading…
Reference in New Issue
Block a user