POL_PCGamingWiki_Download

Informations

Créateur Messages
med_freeman

Information

Cet installateur a été accepté par l'équipe.

Informations

Plate-formes :
Téléchargements : 7067
Wine: System

Retours d'expérience

Description

Download a file from http://pcgamingwiki.com in current folder
Parameters:
- 1: file relative url (i.e : 303-no-one-lives-forever-2-a-spy-in-harms-way-english-patch)

       since all files are under http://community.pcgamingwiki.com/files/download/     
- 2: result file name
- 3: download title

- 4: file md5 sum

Code source

local URL="$1"
local FILE="$2"
local NAME="$3"
local SERVER_MD5="$4"
POL_System_wget "http://community.pcgamingwiki.com/files/download/$URL" "$NAME" -O "$FILE"
local LOCAL_MD5="$(POL_MD5_file "$FILE")"
if [ "$LOCAL_MD5" = "$SERVER_MD5" ]
    then
        POL_Debug_Message "Download MD5 matches"
    else
        POL_SetupWindow_question "$URL\n\n$(eval_gettext 'Error ! Files mismatch\n\nLocal : $LOCAL_MD5\nServer : $SERVER_MD5')\n\n$(eval_gettext 'Do you want to retry?')"
        if [ "$APP_ANSWER" = "TRUE" ]; then
                POL_PCGamingWiki_Download "$URL" "$FILE" "$NAME" "$SERVER_MD5"
        else
                POL_Debug_Error "MD5 sum mismatch !"
        fi
    fi

Contributions

Filters:

Contribuer
Membre Messages
med_freeman Vendredi 29 Mai 2015 à 17:56
med_freeman

Information

Cette mise à jour a été acceptée par l'équipe

Differences

@@ -0,0 +1,17 @@
+local URL="$1"
+local FILE="$2"
+local NAME="$3"
+local SERVER_MD5="$4"
+POL_System_wget "http://community.pcgamingwiki.com/files/download/$URL" "$NAME" -O "$FILE"
+local LOCAL_MD5="$(POL_MD5_file "$FILE")"
+if [ "$LOCAL_MD5" = "$SERVER_MD5" ]
+    then
+        POL_Debug_Message "Download MD5 matches"
+    else
+        POL_SetupWindow_question "$URL\n\n$(eval_gettext 'Error ! Files mismatch\n\nLocal : $LOCAL_MD5\nServer : $SERVER_MD5')\n\n$(eval_gettext 'Do you want to retry?')"
+        if [ "$APP_ANSWER" = "TRUE" ]; then
+                POL_PCGamingWiki_Download "$URL" "$FILE" "$NAME" "$SERVER_MD5"
+        else
+                POL_Debug_Error "MD5 sum mismatch !"
+        fi
+    fi
\ No newline at end of file

Nouveau code source

local URL="$1"
local FILE="$2"
local NAME="$3"
local SERVER_MD5="$4"
POL_System_wget "http://community.pcgamingwiki.com/files/download/$URL" "$NAME" -O "$FILE"
local LOCAL_MD5="$(POL_MD5_file "$FILE")"
if [ "$LOCAL_MD5" = "$SERVER_MD5" ]
    then
        POL_Debug_Message "Download MD5 matches"
    else
        POL_SetupWindow_question "$URL\n\n$(eval_gettext 'Error ! Files mismatch\n\nLocal : $LOCAL_MD5\nServer : $SERVER_MD5')\n\n$(eval_gettext 'Do you want to retry?')"
        if [ "$APP_ANSWER" = "TRUE" ]; then
                POL_PCGamingWiki_Download "$URL" "$FILE" "$NAME" "$SERVER_MD5"
        else
                POL_Debug_Error "MD5 sum mismatch !"
        fi
    fi

Réponses

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com