Lorsque je suis passé sur Arch Linux, j’ai rencontré un petit soucis. Sur Ubuntu, on a un ppa pour garder à jour la dernière build de Firefox Nightly. Mais sur Arch… Il faut se télécharger à la main l’archive sur le site de Mozilla, décompresser, éventuellement créer un fichier .desktop pour avoir un raccourci dans le menu d’applications, …
Du coup j’ai modifié un petit script trouvé pour l’installation de Sublime Text afin de l’adapter à Firefox Nightly.
Je l’ai balancé sur Framagit, mais au cas où, je le pose ici :
#!/bin/sh
START_CMD="firefox-nightly"
INSTALLATION_DIR="/opt/${START_CMD}"
# Download the tarball, unpack and install
URL="https://download.mozilla.org/?product=firefox-nightly-latest-l10n-ssl&os=linux64&lang=fr"
echo "Download from '$URL'"
echo ""
curl -L -o ${HOME}/${START_CMD}.tar.bz2 $URL
if tar -xf ${HOME}/${START_CMD}.tar.bz2 --directory=${HOME}; then
# Create an application launcher file based on the regular firefox launcher
cat /usr/share/applications/firefox.desktop | sed -r 's+Name=Firefox+Name=Firefox Nightly+g' | sed -r "s+Exec=/usr/lib/firefox/firefox+Exec=/opt/${START_CMD}/firefox+g" | sed -r "s+Icon=firefox+Icon=$(echo ${INSTALLATION_DIR} | sed -r 's+/+\\/+g')/browser/chrome/icons/default/default128.png+g" > ${HOME}/firefox/firefox.desktop
# Remove the installation folder and the symlink, they might already exist
sudo rm -rf ${INSTALLATION_DIR} /bin/${START_CMD}
sudo mv ${HOME}/firefox ${INSTALLATION_DIR}
sudo ln -s ${INSTALLATION_DIR}/firefox /bin/${START_CMD}
fi
rm ${HOME}/${START_CMD}.tar.bz2
# Add to applications list
sudo ln -sf ${INSTALLATION_DIR}/firefox.desktop /usr/share/applications/${START_CMD}.desktop
INIFILE="/opt/firefox-nightly/platform.ini"
B=$(awk -F "=" '/BuildID/ {print $2}' $INIFILE)
VERSION=$(awk -F "=" '/Milestone/ {print $2}' $INIFILE)
echo ""
echo "Firefox Nightly $VERSION ($(echo $B | cut -c1-4)-$(echo $B | cut -c5-6)-$(echo $B | cut -c7-8)) Installed"
echo "Run with: ${START_CMD}"
Vous pouvez soit tout prendre et le coller dans un fichier, et l’exécuter ainsi :
sudo sh monscript
Ou alors, avec un curl
directement depuis Framagit :
sudo curl -L https://framagit.org/snippets/5828/raw | sh
Et ça fonctionne impec ! :



Pour le lancer, un simple firefox-nightly dans une console et c’est parti (ajout d’un lien dans /bin/).
Sinon, une nouvelle icône devrait apparaître dans votre menu d’applications. Si ce n’est pas le cas, essayez de rafraichir le cache avec la commande :
update-desktop-database ~/.local/share/applications
A noter que ce script nécessite Firefox stable installé sur votre PC Linux 64 bits.
Laisser un commentaire