Commit ea93c869 authored by Rodolpho Eckhardt's avatar Rodolpho Eckhardt
Browse files

Build unrar before getting new SKL ME directory.

parent 579101e7
......@@ -204,16 +204,6 @@ get_and_patch_me_11 () {
if [ -f "$rar_filename" ]; then
sha=$(sha256sum "$rar_filename" | awk '{print $1}')
fi
if [ "$sha" != "$SKL_ME_RAR_SHA" ]; then
DIRECT_LINK=$(wget -O - "$SKL_ME_RAR_URL" 2>/dev/null | grep -o -e 'http://download.*.rar' | head -n 1)
wget -O "$rar_filename" "$DIRECT_LINK"
sha=$(sha256sum "$rar_filename" | awk '{print $1}')
if [ "$sha" != "$SKL_ME_RAR_SHA" ]; then
# We'll assume the rar file was updated again
me_dirname=$(unrar l "$rar_filename" | grep '\.\.\.D\.\.\.' | tr -s [:blank:] | cut -d' ' -f 6-)
SKL_ME_FULL_FILENAME="$me_dirname/$SKL_ME_FILENAME"
fi
fi
if ! type "$unrar" &> /dev/null; then
wget -O unrar.tar.gz "$RAR_NONFREE_SOURCE_URL"
sha=$(sha256sum unrar.tar.gz | awk '{print $1}')
......@@ -227,6 +217,16 @@ get_and_patch_me_11 () {
)
unrar="`pwd`/unrar/unrar"
fi
if [ "$sha" != "$SKL_ME_RAR_SHA" ]; then
DIRECT_LINK=$(wget -O - "$SKL_ME_RAR_URL" 2>/dev/null | grep -o -e 'http://download.*.rar' | head -n 1)
wget -O "$rar_filename" "$DIRECT_LINK"
sha=$(sha256sum "$rar_filename" | awk '{print $1}')
if [ "$sha" != "$SKL_ME_RAR_SHA" ]; then
# We'll assume the rar file was updated again
me_dirname=$("$unrar" l "$rar_filename" | grep '\.\.\.D\.\.\.' | tr -s [:blank:] | cut -d' ' -f 6-)
SKL_ME_FULL_FILENAME="$me_dirname/$SKL_ME_FILENAME"
fi
fi
if type "$unrar" &> /dev/null; then
"$unrar" e -y "$rar_filename" "$SKL_ME_FULL_FILENAME"
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment