How to update Firefox
Posted: 10 Sep 2017, 14:36
SxN did you look here: http://dl.porteus.org/x86_64/Porteus-v3.2.2/modules/ ? Download, put in a Porteus modules folder, activate.
SxN did you look here: http://dl.porteus.org/x86_64/Porteus-v3.2.2/modules/ ? Download, put in a Porteus modules folder, activate.
Code: Select all
cp -a --parents /home/guest/.mozilla/plugins /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/profiles.ini /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/places.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/formhistory.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/prefs.js /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/xulstore.json /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/logins.json /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/permissions.sqlite /tmp/mod/
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/key3.db /tmp/mod/
if [ -d /home/guest/.mozilla/firefox/dxsqumip.default/extensions/ ]; then
cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/extensions/* /tmp/mod/
fi
cp -a --parents /home/guest/.java/deployment/security/exception.sites /tmp/mod/
Code: Select all
+ rm -rf /home/guest/Desktop/profile-firefox/
rm: cannot remove '/home/guest/Desktop/profile-firefox/home': Permission denied
guest@porteus:~$ ls -lght Desktop
total 3.3M
-rw-r--r-- 1 root 1.7M Sep 11 15:15 profile.firefox-20170911-1514.xzm
drwxr-xr-x 3 root 60 Sep 11 15:14 profile-firefox/
-rw-r--r-- 1 users 1.5M Sep 11 15:14 profile.firefox-20170911-1514.tar.xz
Code: Select all
XZ_OPT=e9
Code: Select all
XZ_OPT=d
Code: Select all
#!/bin/sh
# SAVE FIREFOX profile
cd $(xdg-user-dir DESKTOP)
tar cf - $HOME/.mozilla | tar xfp -
mksquashfs ./home/ firefox-profile-$(date +%Y%m%d-%H%M).xzm -b 1M -comp xz -Xbcj x86 -noappend -keep-as-directory
rm -r ./home
if [ "$(which kdialog)" ]; then
kdialog --msgbox "Firefox config SAVED, copy the resulting .xzm in BASE or MODULES folder inside your porteus folder"
else
Xdialog --msgbox "Firefox config SAVED, copy the resulting .xzm in BASE or MODULES folder inside your porteus folder" 0 0
fi
Code: Select all
#!/bin/sh
# SAVE CHROMIUM profile
cd $(xdg-user-dir DESKTOP)
tar cf - $HOME/.config/chromium | tar xfp -
mksquashfs ./home/ chromium-profile-$(date +%Y%m%d-%H%M).xzm -b 1M -comp xz -Xbcj x86 -noappend -keep-as-directory
rm -r ./home
if [ "$(which kdialog)" ]; then
kdialog --msgbox "Chromium config SAVED, copy the resulting .xzm in BASE or MODULES folder inside your porteus folder"
else
Xdialog --msgbox "Chromium config SAVED, copy the resulting .xzm in BASE or MODULES folder inside your porteus folder" 0 0
fi
Code: Select all
#!/bin/sh
#====< root >====
if [ `whoami` != root ]
then
echo "This command must be used by root."
exit 1
fi
#====< mkfirefox/mkthunderbird >====
CMD=$0
CMD=${CMD##*/}
if [ "$CMD" = mkfirefox ]
then
CMD="firefox"
else
CMD="thunderbird"
fi
#====< Default >====
if uname -m | grep "x86_64" >/dev/null
then
ARCH=x86_64
OS=linux64
else
ARCH=i686
OS=linux
fi
. /usr/local/share/mkfirefox/bin/lang.list
LOCALE=`lang2localeID`
#====< ARG >====
ERROR=no
MAX=$#
#DeBug echo "MAX=$#"
i=0
while [ $i -lt $MAX ]
do
#DeBug echo $1
AR=$1
shift
i=`expr $i + 1`
if [ "${AR:0:1}" = "-" ]
then
ERROR=yes
echo "option error: -$AR"
continue
fi
case $AR in
32)
ARCH=i686
OS=linux
;;
64)
ARCH=x86_64
OS=linux64
;;
*)
LOCALE=$AR
;;
esac
done
if [ $ERROR = yes ]
then
exit 1
fi
mkdir -p /tmp/mkfirefox
for i in 1 2 3 4 5
do
if wget --no-check-certificate "https://download.mozilla.org/?product=${CMD}-latest&os=${OS}&lang=${LOCALE}" -P /tmp/mkfirefox
then
break
fi
sleep 1
done
if [ ! -f /tmp/mkfirefox/* ]
then
rm -fr /tmp/mkfirefox
exit 1
fi
packagecompression=`file /tmp/mkfirefox/* | cut -d ' ' -f 2`
cp -a /usr/local/share/mkfirefox/lib/${CMD} /tmp/mkfirefox/firefox-dir
if [ -d /tmp/mkfirefox/firefox-dir/home ]
then
chown -R guest:guest /tmp/mkfirefox/firefox-dir/home/guest
fi
(
cd /tmp/mkfirefox
$packagecompression -dc /tmp/mkfirefox/index.html* | tar -x
grep version ${CMD}/application.ini | cut -d '&' -f 2|cut -d '=' -f 2 > ver
mv ${CMD} firefox-dir/usr/lib/.
)
V=`/bin/ls /var/log/packages/ | grep amkslimjet |rev`
V=${V:0:1}
VER=`cat /tmp/mkfirefox/ver`
mv /tmp/mkfirefox/firefox-dir 004-${CMD}-$LOCALE-$VER-$ARCH-${V}
rm -fr /tmp/mkfirefox
#/usr/local/share/mkfirefox/bin/mklog 004-${CMD}-$LOCALE-$VER-$ARCH-${V}
mklog 004-${CMD}-$LOCALE-$VER-$ARCH-${V}
rm -fr 004-${CMD}-$VER-$ARCH-${V}.xzm
#/usr/local/share/mkfirefox/bin/mkXZM 004-${CMD}-$LOCALE-$VER-$ARCH-${V}
mkXZM 004-${CMD}-$LOCALE-$VER-$ARCH-${V}
rm -fr 004-${CMD}-$LOCALE-$VER-$ARCH-${V}
Code: Select all
## lang.list
##=== available firefox locale ID ===##
# ach,af,an,ar,as,ast,az,be,bg,bn-BD,bn-IN,br,bs,ca,cs,cy,da,de,dsb,el,en-GB,en-US,en-ZA,eo,es-AR,es-CL,es-ES,es-MX,
# et,eu,fa,ff,fi,fr,fy-NL,ga-IE,gd,gl,gu-IN,he,hi-IN,hr,hsb,hu,hy-AM,id,is,it,ja,kk,km,kn,ko,lij,lt,lv,mai,mk,ml,mr,ms,
# nb-NO,nl,nn-NO,or,pa-IN,pl,pt-BR,pt-PT,rm,ro,ru,si,sk,sl,son,sq,sr,sv-SE,ta,te,th,tr,uk,uz,vi,xh,xpi,zh-CN,zh-TW
##========================================##
lang2localeID()
{
case $LANG in
#aa_DJ
#aa_ER
#aa_ET
af_ZA* ) echo -n af; ;;
#am_ET
an_ES* ) echo -n an; ;;
#ar_AE
#ar_BH
#ar_DZ
#ar_EG
#ar_IN
#ar_IQ
#ar_JO
#ar_KW
#ar_LB
#ar_LY
#ar_MA
#ar_OM
#ar_QA
#ar_SA
#ar_SD
#ar_SY
#ar_TN
#ar_YE
ar_* ) echo -n ar; ;;
as_IN* ) echo -n as; ;;
ast_ES* ) echo -n ast; ;;
#ayc_PE
az_AZ* ) echo -n az; ;;
be_BY* ) echo -n be; ;;
#bem_ZM
#ber_DZ
#ber_MA
bg_BG* ) echo -n bg; ;;
#bho_IN
bn_BD* ) echo -n bn-BD; ;;
bn_IN* ) echo -n bn-IN; ;;
#bo_CN
#bo_IN
br_FR* ) echo -n br; ;;
#brx_IN
bs_BA* ) echo -n bs; ;;
#byn_ER
#ca_AD
#ca_ES
#ca_FR
#ca_IT
ca_* ) echo -n ca; ;;
#crh_UA
cs_CZ* ) echo -n cs; ;;
#csb_PL
#cv_RU
cy_GB* ) echo -n cy; ;;
da_DK* ) echo -n da; ;;
#de_AT
#de_BE
#de_CH
#de_DE
#de_LU
de_* ) echo -n de; ;;
#doi_IN
#dv_MV
#dz_BT
#el_CY
#el_GR
el_* ) echo -n el; ;;
#en_AG
#en_AU
#en_BW
#en_CA
#en_DK
en_GB* ) echo -n en-GB; ;;
#en_HK
#en_IE
#en_IN
#en_NG
#en_NZ
#en_PH
#en_SG
en_US* ) echo -n en-US; ;;
en_ZA* ) echo -n en-ZA; ;;
#en_ZM
#en_ZW
en_* | C) echo -n en-US; ;;
es_AR* ) echo -n es-AR; ;;
#es_BO
es_CL* ) echo -n es-CL; ;;
#es_CO
#es_CR
#es_CU
#es_DO
#es_EC
es_ES* ) echo -n es-ES; ;;
#es_GT
#es_HN
es_MX* ) echo -n es-MX; ;;
#es_NI
#es_PA
#es_PE
#es_PR
#es_PY
#es_SV
#es_US
#es_UY
#es_VE
es_* ) echo -n es-ES; ;;
et_EE* ) echo -n et; ;;
eu_ES* ) echo -n eu; ;;
fa_IR* ) echo -n fa; ;;
ff_SN* ) echo -n ff; ;;
fi_FI* ) echo -n fi; ;;
#fil_PH
#fo_FO
#fr_BE
#fr_CA
#fr_CH
#fr_FR
#fr_LU
fr_* ) echo -n fr; ;;
#fur_IT
#fy_DE
fy_NL* ) echo -n fy-NL; ;;
ga_IE* ) echo -n ga-IE; ;;
gd_GB* ) echo -n gd; ;;
#gez_ER
#gez_ET
gl_ES* ) echo -n gl; ;;
gu_IN* ) echo -n gu-IN; ;;
#gv_GB
#ha_NG
he_IL* ) echo -n he; ;;
hi_IN* ) echo -n hi-IN; ;;
#hne_IN
hr_HR* ) echo -n hr; ;;
hsb_DE* ) echo -n hsb; ;;
#ht_HT
hu_HU* ) echo -n hu; ;;
hy_AM* ) echo -n hy-AM; ;;
#ia_FR
id_ID* ) echo -n id; ;;
#ig_NG
#ik_CA
is_IS* ) echo -n is; ;;
#it_CH
#it_IT
it_* ) echo -n it; ;;
#iu_CA
#iw_IL
ja_JP* ) echo -n ja; ;;
#ka_GE
kk_KZ* ) echo -n kk; ;;
#kl_GL
km_KH* ) echo -n km; ;;
kn_IN* ) echo -n kn; ;;
ko_KR* ) echo -n ko; ;;
#kok_IN
#ks_IN
#ku_TR
#kw_GB
#ky_KG
#lb_LU
#lg_UG
#li_BE
#li_NL
lij_IT* ) echo -n lij; ;;
#lo_LA
lt_LT* ) echo -n lt; ;;
lv_LV* ) echo -n lv; ;;
#mag_IN
mai_IN* ) echo -n mai; ;;
#mg_MG
#mhr_RU
#mi_NZ
mk_MK* ) echo -n mk; ;;
ml_IN* ) echo -n ml; ;;
#mn_MN
#mni_IN
mr_IN* ) echo -n mr; ;;
ms_MY* ) echo -n ms; ;;
#mt_MT
#my_MM
#nan_TW
nb_NO* ) echo -n nb-NO; ;;
#nds_DE
#nds_NL
#ne_NP
#nhn_MX
#niu_NU
#niu_NZ
#nl_AW
#nl_BE
#nl_NL
nl_* ) echo -n nl; ;;
nn_NO* ) echo -n nn-NO; ;;
#nr_ZA
#nso_ZA
#oc_FR
#om_ET
#om_KE
or_IN* ) echo -n or; ;;
#os_RU
pa_IN* ) echo -n pa-IN; ;;
#pa_PK
#pap_AN
pl_PL* ) echo -n pl; ;;
#ps_AF
pt_BR* ) echo -n pt-BR; ;;
pt_PT* ) echo -n pt-PT; ;;
ro_RO* ) echo -n ro; ;;
#ru_RU
#ru_UA
ru_* ) echo -n ru; ;;
#rw_RW
#sa_IN
#sat_IN
#sc_IT
#sd_IN
#se_NO
#shs_CA
si_LK* ) echo -n si; ;;
#sid_ET
sk_SK* ) echo -n sk; ;;
sl_SI* ) echo -n sl; ;;
#so_DJ
#so_ET
#so_KE
#so_SO
#sq_AL
#sq_MK
sq_* ) echo -n sq; ;;
#sr_ME
#sr_RS
sr_* ) echo -n sr; ;;
#ss_ZA
#st_ZA
#sv_FI
sv_SE* ) echo -n sv-SE; ;;
#sw_KE
#sw_TZ
#szl_PL
#ta_IN
#ta_LK
ta_* ) echo -n ta; ;;
te_IN* ) echo -n te; ;;
#tg_TJ
th_TH* ) echo -n th; ;;
#ti_ER
#ti_ET
#tig_ER
#tk_TM
#tl_PH
#tn_ZA
#tr_CY
#tr_TR
tr_* ) echo -n tr; ;;
#ts_ZA
#tt_RU
#ug_CN
uk_UA* ) echo -n uk; ;;
#unm_US
#ur_IN
#ur_PK
uz_UZ* ) echo -n uz; ;;
#ve_ZA
vi_VN* ) echo -n vi; ;;
#wa_BE
#wae_CH
#wal_ET
#wo_SN
xh_ZA* ) echo -n xh; ;;
#yi_US
#yo_NG
#yue_HK
zh_CN* ) echo -n zh-CN; ;;
#zh_HK
#zh_SG
zh_TW* ) echo -n zh-TW; ;;
#zu_ZA
* ) echo -n en-US; ;;
esac
}