FirefoxInstallerLinux/extras/firefox-developer/firefox-developer_installer_64

79 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
#based on v1.0
VERSIONFIREFOX=$(curl https://raw.githubusercontent.com/Can202/FirefoxInstallerLinux/develop/versions/firefox-dev)
ARCHT="x86_64"
clear
echo "Firefox Developer Installer"
echo "by Can202"
depen=true
echo "checking dependencies..."
if [ ! -f "/usr/bin/git" ]
then
echo git is not installed...
depen=false
read nothing
fi
if [ ! -f "/usr/bin/curl" ]
then
echo curl is not installed...
depen=false
read nothing
fi
if [ ! -f "/usr/bin/tar" ]
then
echo tar is not installed...
depen=false
read nothing
fi
if [ $depen = "false" ]
then
exit
fi
cd /tmp/
# removing cache
if [ -d "/tmp/FirefoxInstalerCache/" ]
then
rm -R FirefoxInstalerCache/
fi
mkdir FirefoxInstalerCache/
cd FirefoxInstalerCache/
echo "Cache folder created"
curl -O https://download-installer.cdn.mozilla.net/pub/devedition/releases/$VERSIONFIREFOX/linux-$ARCHT/en-US/firefox-$VERSIONFIREFOX.tar.bz2
tar -xjvf firefox-$VERSIONFIREFOX.tar.bz2
echo "Firefox Developer binary downloaded and unzipped"
git clone https://github.com/Can202/FirefoxInstallerLinux
cd FirefoxInstallerLinux/
git checkout v1.0
cd ../
echo "media cloned!"
sed -i 's/userh/'$USER'/g' FirefoxInstallerLinux/extras/firefox-developer/firefox-developer-can.desktop
sed -i 's/userh/'$USER'/g' FirefoxInstallerLinux/extras/firefox-developer/firefox-developer-can
cp -R firefox/ /home/$USER/.firefox-developer-can
chmod a+x FirefoxInstallerLinux/extras/firefox-developer/firefox-developer-can
cp FirefoxInstallerLinux/extras/firefox-developer/firefox-developer-can.desktop /home/$USER/.local/share/applications/
cp FirefoxInstallerLinux/extras/firefox-developer/firefox-developer-can /home/$USER/.firefox-developer-can/
echo "Firefox Developer installed"
cd ../
rm -R FirefoxInstalerCache/
echo "chache removed!"