aboutsummaryrefslogtreecommitdiff
path: root/share/hoarder/firefox-dev/unix/linux/install
blob: b0f95ae7d2163ccb771d1ac03c94264073bc39db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env sh
#
# Install Firefox Developer Edition
#

# Parameters
SHARE="$1"
LIB="$2"

# Include basic functions
. $LIB/trashman/functions || exit 1

# Requirements
trashman_require wget

# Additional parameters
#URL="https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=pt-BR"
URL="https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64"
FILE="firefox-dev-latest.tar.bz2"
WORK="`mktemp -d`" || exit 1

# Download
wget "$URL" -O $WORK/$FILE   || exit 1
tar xvf $WORK/$FILE -C $WORK || exit 1

# Install
mkdir -p $HOME/.local/share  || exit 1
cd $HOME/.local/share        || exit 1
rm -rf firefox-dev           || exit 1
mv $WORK/firefox firefox-dev || exit 1
rm -rf $WORK                 || exit 1

# Create symlink to scripts
mkdir -p $HOME/.local/bin                                 || exit 1
cd $HOME/.local/bin                                       || exit 1
ln -sf $HOME/.local/share/firefox-dev/firefox firefox-dev || exit 1

trashman_installed_at $HOME/.local/share/firefox
trashman_run_with $HOME/.local/bin/firefox