From 6397ceb0de9c235bb5ad3e0717254e2797131bf6 Mon Sep 17 00:00:00 2001 From: r4sas Date: Tue, 7 Feb 2017 16:32:31 +0300 Subject: [PATCH] updated linux builder --- linux/.gitignore | 3 ++ linux/README.md | 4 +- linux/{ => build}/configs/bookmarks.html | 0 linux/{ => build}/configs/prefs.js | 0 linux/{ => build}/configs/xulstore.json | 0 linux/{ => build}/i2pdbrowserportable.sh | 54 +++++++++++------------- 6 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 linux/.gitignore rename linux/{ => build}/configs/bookmarks.html (100%) rename linux/{ => build}/configs/prefs.js (100%) rename linux/{ => build}/configs/xulstore.json (100%) rename linux/{ => build}/i2pdbrowserportable.sh (50%) diff --git a/linux/.gitignore b/linux/.gitignore new file mode 100644 index 0000000..3a997de --- /dev/null +++ b/linux/.gitignore @@ -0,0 +1,3 @@ +app +data +firefox-portable diff --git a/linux/README.md b/linux/README.md index 6507631..78791ac 100644 --- a/linux/README.md +++ b/linux/README.md @@ -11,9 +11,9 @@ What works now How to use ----- -1. Build preconfigured FireFox using script `./i2pdbrowserportable.sh` +1. Build preconfigured FireFox using script `i2pdbrowserportable.sh` from `build` folder 2. Run i2pd by executing `./i2pd` from `i2pd` folder -3. Run FireFox by executing `./firefox-portable` from `firefox-portable` folder +3. Run FireFox by executing `./firefox-portable` Additional info ----- diff --git a/linux/configs/bookmarks.html b/linux/build/configs/bookmarks.html similarity index 100% rename from linux/configs/bookmarks.html rename to linux/build/configs/bookmarks.html diff --git a/linux/configs/prefs.js b/linux/build/configs/prefs.js similarity index 100% rename from linux/configs/prefs.js rename to linux/build/configs/prefs.js diff --git a/linux/configs/xulstore.json b/linux/build/configs/xulstore.json similarity index 100% rename from linux/configs/xulstore.json rename to linux/build/configs/xulstore.json diff --git a/linux/i2pdbrowserportable.sh b/linux/build/i2pdbrowserportable.sh similarity index 50% rename from linux/i2pdbrowserportable.sh rename to linux/build/i2pdbrowserportable.sh index 8f83603..86a8b82 100755 --- a/linux/i2pdbrowserportable.sh +++ b/linux/build/i2pdbrowserportable.sh @@ -16,16 +16,13 @@ echo "This script prepearing $application $version for use with I2Pd" file="$application-$version.tar.bz2" url="https://ftp.mozilla.org/pub/$application/releases/$version/linux-$arch/$language/$file" -dir="$application-portable" -mkdir "$dir" -cd "$dir" echo "Downloading $application..." -wget -q $url +curl -L -f -# -O $url if [ $? -ne 0 ]; then # Not found error, trying to cut language variable language=$(echo $language | cut -c-2) # re-create variable with cutted lang url="https://ftp.mozilla.org/pub/$application/releases/$version/linux-$arch/$language/$file" - wget -q $url + curl -L -f -# -O $url fi if [ ! -f $file ]; then echo "Can't find downloaded file. Does FireFox support your system language?" @@ -34,38 +31,37 @@ fi echo "Extracting archive, please wait..." tar xfj $file rm $file -mv $application app -mkdir data +mv $application ../app +mkdir ../data # Deleting some not needed files -rm app/crashreporter* -rm app/removed-files -rm app/run-mozilla.sh -rm app/update* -rm app/browser/blocklist.xml -rm -r app/dictionaries +rm ../app/crashreporter* +rm ../app/removed-files +rm ../app/run-mozilla.sh +rm ../app/update* +rm ../app/browser/blocklist.xml +rm -r ../app/dictionaries # 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 +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 NoScript extension..." -wget -q https://addons.mozilla.org/firefox/downloads/latest/noscript/addon-722-latest.xpi?src=search -O app/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi +curl -L -f -# -O https://addons.mozilla.org/firefox/downloads/latest/noscript/addon-722-latest.xpi +mv addon-722-latest.xpi ../app/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi echo "Adding standart configs..." -mv ../configs/* data/ -rm -rf ../configs +cp configs/* ../data/ -echo '#!/bin/sh' > "${application}-portable" -echo 'dir=${0%/*}' >> "${application}-portable" -echo 'if [ "$dir" = "$0" ]; then' >> "${application}-portable" -echo ' dir="."' >> "${application}-portable" -echo 'fi' >> "${application}-portable" -echo 'cd "$dir/app"' >> "${application}-portable" -echo './firefox -profile ../data -no-remote' >> "${application}-portable" +echo '#!/bin/sh' > "../${application}-portable" +echo 'dir=${0%/*}' >> "../${application}-portable" +echo 'if [ "$dir" = "$0" ]; then' >> "../${application}-portable" +echo ' dir="."' >> "../${application}-portable" +echo 'fi' >> "../${application}-portable" +echo 'cd "$dir/app"' >> "../${application}-portable" +echo './firefox -profile ../data -no-remote' >> "../${application}-portable" -chmod +x "$application-portable" +chmod +x "../$application-portable" echo ... finished -rm ../$0