Make raw copy or hardlink instead of symlink, mainly for container test usage
This commit is contained in:
parent
84c3fdd8fa
commit
016d530b57
@ -60,4 +60,4 @@ RUN chmod 777 /var/www/fic-server/onyx/cache/ /var/www/fic-server/onyx/cache/tem
|
||||
|
||||
EXPOSE 80/tcp 443/tcp
|
||||
VOLUME ["/var/www/fic-server/out","/var/www/fic-server/files","/var/www/fic-server/submissions"]
|
||||
CMD ["sh", "-c", "chown -R www-data:www-data /var/www/fic-server/misc /var/www/fic-server/submission; cd /var/www/fic-server/misc; if ! [ -f server.crt ]; then bash ./CA.sh -newserver; fi; service nginx start && service php5-fpm start && service mysql start && mkdir files && ../gen_hash_link_files.sh ../files-in ../files && (../launch_local.sh &); /bin/bash"]
|
||||
CMD ["sh", "-c", "chown -R www-data:www-data /var/www/fic-server/misc /var/www/fic-server/submission; cd /var/www/fic-server/misc; if ! [ -f server.crt ]; then bash ./CA.sh -newserver; fi; service nginx start && service php5-fpm start && service mysql start && mkdir files && ../gen_hash_link_files.sh --copy ../files-in ../files && (../launch_local.sh &); /bin/bash"]
|
||||
|
@ -6,6 +6,18 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "--hard" ]
|
||||
then
|
||||
LN="ln"
|
||||
shift
|
||||
elif [ "$1" = "--copy" ]
|
||||
then
|
||||
LN="cp"
|
||||
shift
|
||||
else
|
||||
LN="ln -s"
|
||||
fi
|
||||
|
||||
FROM=`realpath $1`; shift
|
||||
TO=`realpath $1`; shift
|
||||
|
||||
@ -28,5 +40,5 @@ do
|
||||
HASH=`echo -n $FILE | sha384sum | cut -d " " -f 1`
|
||||
|
||||
mkdir -p "$TO/$HASH/"
|
||||
ln -s "$i" "$TO/$HASH/"
|
||||
$LN "$i" "$TO/$HASH/"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user