Skip to content
Extraits de code Groupes Projets
Valider 5b5949cc rédigé par Miryuni's avatar Miryuni
Parcourir les fichiers

Added comments

parent 3cff0da2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -62,7 +62,8 @@ packname=${dir##*/} ...@@ -62,7 +62,8 @@ packname=${dir##*/}
slug=$(slugify "$packname") slug=$(slugify "$packname")
homeserver=$(slug_homeserver $2) homeserver=$(slug_homeserver $2)
# Checking if the homeserver exist # Checking if the homeserver exist.
# If the homeserver does not exist, the file headers is not created
curl "https://$homeserver" -I -o headers -s curl "https://$homeserver" -I -o headers -s
if test -f "headers"; then if test -f "headers"; then
rm headers rm headers
...@@ -71,7 +72,9 @@ else ...@@ -71,7 +72,9 @@ else
exit 1 exit 1
fi fi
# Checking if the token exist # Checking if the token exist.
# Save the error value on file "headers" and
# compare the error to verify the token
curl -s -X POST "https://$homeserver/_matrix/media/r0/upload?access_token=$token" | python3 -c "import sys, json; print(json.load(sys.stdin)['errcode'])" >> headers curl -s -X POST "https://$homeserver/_matrix/media/r0/upload?access_token=$token" | python3 -c "import sys, json; print(json.load(sys.stdin)['errcode'])" >> headers
while read line; do while read line; do
if [[ ($line == "M_UNKNOWN") ]] if [[ ($line == "M_UNKNOWN") ]]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter