mirror of
https://github.com/oooo-ps/i2pdbrowser.git
synced 2026-04-01 14:15:29 +00:00
update linux scripts
Former-commit-id: a1b26f90c2524371cf36d20e2f4951a1a57860c3
This commit is contained in:
parent
fd635c9997
commit
34b8bdaec1
34 changed files with 383 additions and 4746 deletions
|
|
@ -12,14 +12,19 @@ cd $dir
|
|||
|
||||
arch=$(uname -m)
|
||||
language=$(echo $LANG | cut -c-5 | sed s/_/-/g)
|
||||
version="60.9.0esr"
|
||||
version="78.11.0esr"
|
||||
application="firefox"
|
||||
ftpmirror="https://ftp.mozilla.org/pub/$application/releases/$version"
|
||||
|
||||
curlfind=$(which curl)
|
||||
if [ -z $curlfind ]; then
|
||||
echo "'cURL' does not seem to be installed. The script needs it!";
|
||||
exit 1;
|
||||
echo "'cURL' does not seem to be installed. The script needs it!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We support only English (US) and Russian
|
||||
if [ "$language" != "ru" ]; then
|
||||
language="en-US"
|
||||
fi
|
||||
|
||||
echo "This script is preparing $application $version for use with I2Pd"
|
||||
|
|
@ -30,27 +35,27 @@ filepath="linux-$arch/$language/$file"
|
|||
echo "Downloading $application..."
|
||||
curl -L -f -# -O $ftpmirror/$filepath
|
||||
if [ $? -ne 0 ]; then # Not found error, trying to cut language variable
|
||||
echo "[TRY 2] I'll try downloading Firefox with shorter language code";
|
||||
echo "[TRY 2] I'll try downloading Firefox with shorter language code"
|
||||
language=$(echo $language | cut -c-2)
|
||||
# re-create variable with cutted lang
|
||||
filepath="linux-$arch/$language/$file"
|
||||
curl -L -f -# -O $ftpmirror/$filepath
|
||||
if [ $? -ne 0 ]; then # Not found error, trying to download english version
|
||||
echo "[TRY 3] I'll try downloading Firefox with the English language code";
|
||||
echo "[TRY 3] I'll try downloading Firefox with the English language code"
|
||||
language="en_US"
|
||||
# re-create lang variable
|
||||
filepath="linux-$arch/$language/$file"
|
||||
curl -L -f -# -O $ftpmirror/$filepath
|
||||
if [ $? -ne 0 ]; then # After that i can say only that user haven't internet connection
|
||||
echo "[Error] Can't download file. Check your internet connectivity."
|
||||
exit 1;
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f $file ]; then
|
||||
echo "[Error] Can't find downloaded file. Does it really exist?"
|
||||
exit 1;
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Downloading checksum file and checking SHA512 checksum"
|
||||
|
|
@ -59,7 +64,7 @@ recv_sum=$(grep "$filepath" SHA512SUMS | cut -c-128)
|
|||
file_sum=$(sha512sum $file | cut -c-128)
|
||||
if [ $recv_sum != $file_sum ]; then
|
||||
echo "[Error] File checksum failed!"
|
||||
exit 1;
|
||||
exit 1
|
||||
else
|
||||
echo "Checksum correct."
|
||||
rm SHA512SUMS
|
||||
|
|
@ -78,33 +83,35 @@ rm ../app/pingsender
|
|||
rm ../app/precomplete
|
||||
rm ../app/removed-files
|
||||
rm ../app/update*
|
||||
rm ../app/browser/blocklist.xml
|
||||
rm ../app/Throbber-small.gif
|
||||
rm ../app/browser/crashreporter-override.ini
|
||||
rm ../app/browser/features/aushelper@mozilla.org.xpi
|
||||
rm ../app/browser/features/firefox@getpocket.com.xpi
|
||||
rm ../app/browser/features/followonsearch@mozilla.com.xpi
|
||||
rm ../app/browser/features/formautofill@mozilla.org.xpi
|
||||
rm ../app/browser/features/jaws-esr@mozilla.org.xpi
|
||||
rm ../app/browser/features/onboarding@mozilla.org.xpi
|
||||
rm ../app/browser/features/screenshots@mozilla.org.xpi
|
||||
rm -r ../app/dictionaries
|
||||
rm -r ../app/icons
|
||||
# And edit some places
|
||||
sed -i 's/Enabled=1/Enabled=0/g' ../app/application.ini
|
||||
sed -i 's/ServerURL=.*/ServerURL=-/' ../app/application.ini
|
||||
# sed -i 's/Enabled=1/Enabled=0/g' ../app/webapprt/webapprt.ini
|
||||
# sed -i 's/ServerURL=.*/ServerURL=-/' ../app/webapprt/webapprt.ini
|
||||
# Done!
|
||||
|
||||
echo "Downloading language packs..."
|
||||
curl -L -f -# -o ../app/browser/extensions/langpack-ru@firefox.mozilla.org.xpi https://addons.mozilla.org/firefox/downloads/file/978562/russian_ru_language_pack-60.0buildid20180605171542-an+fx.xpi
|
||||
curl -L -f -# -o ../app/browser/extensions/langpack-en-US@firefox.mozilla.org.xpi https://addons.mozilla.org/firefox/downloads/file/978493/english_us_language_pack-60.0buildid20180605171542-an+fx.xpi
|
||||
mkdir ../app/browser/extensions
|
||||
curl -L -f -# -o ../app/browser/extensions/langpack-ru@firefox.mozilla.org.xpi https://addons.mozilla.org/firefox/downloads/file/3605589/russian_ru_language_pack-78.0buildid20200708170202-fx.xpi
|
||||
curl -L -f -# -o ../app/browser/extensions/ru@dictionaries.addons.mozilla.org.xpi https://addons.mozilla.org/firefox/downloads/file/1163927/russian_spellchecking_dictionary-0.4.5.1webext.xpi
|
||||
curl -L -f -# -o ../app/browser/extensions/langpack-en-US@firefox.mozilla.org.xpi https://addons.mozilla.org/firefox/downloads/file/3605503/english_us_language_pack-78.0buildid20200708170202-fx.xpi
|
||||
curl -L -f -# -o ../app/browser/extensions/en-US@dictionaries.addons.mozilla.org.xpi https://addons.mozilla.org/firefox/downloads/file/3498005/english_united_states_dictionary-68.0.xpi
|
||||
|
||||
echo "Downloading NoScript extension..."
|
||||
curl -L -f -# -o ../app/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi https://addons.mozilla.org/firefox/downloads/file/3383315/noscript_security_suite-11.0.3-an+fx.xpi
|
||||
curl -L -f -# -o ../app/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi https://addons.mozilla.org/firefox/downloads/file/3625174/noscript_security_suite-11.0.38-an+fx.xpi
|
||||
|
||||
echo "Adding standard configs..."
|
||||
cp profile/* ../data/
|
||||
cp -r preferences/* ../app/
|
||||
cp -r profile/* ../data/
|
||||
|
||||
if [ "$language" = "ru" ]; then
|
||||
cp -r profile-ru/* ../data/
|
||||
else
|
||||
cp -r profile-en/* ../data/
|
||||
fi
|
||||
|
||||
echo '#!/bin/sh' > "../${application}-portable"
|
||||
echo 'dir=${0%/*}' >> "../${application}-portable"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue