Browse files

Version Firefox directory

  • Loading branch information...
1 parent 688ab55 commit 7385c5c50e4e42db0564c1bbe73784e24ebe97d0 @henrikhodne henrikhodne committed Apr 8, 2013
View
16 examples/build_generic_addons_firefox.sh
@@ -98,18 +98,18 @@ travis_finish announce $?
travis_start before_install
echo -en 'travis_fold:start:install_firefox\r'
echo -e "Installing Firefox v20.0";
-echo \$\ sudo\ mkdir\ -p\ /usr/local/firefox
-sudo mkdir -p /usr/local/firefox
-echo \$\ sudo\ chown\ travis\ /usr/local/firefox
-sudo chown travis /usr/local/firefox
+echo \$\ sudo\ mkdir\ -p\ /usr/local/firefox/20.0
+sudo mkdir -p /usr/local/firefox/20.0
+echo \$\ sudo\ chown\ -R\ travis\ /usr/local/firefox
+sudo chown -R travis /usr/local/firefox
echo \$\ wget\ -O\ /tmp/firefox.tar.bz2\ ftp://ftp.mozilla.org/pub/firefox/releases/20.0/linux-x86_64/en-US/firefox-20.0.tar.bz2
wget -O /tmp/firefox.tar.bz2 ftp://ftp.mozilla.org/pub/firefox/releases/20.0/linux-x86_64/en-US/firefox-20.0.tar.bz2
-echo \$\ pushd\ /usr/local/firefox
-pushd /usr/local/firefox
+echo \$\ pushd\ /usr/local/firefox/20.0
+pushd /usr/local/firefox/20.0
echo \$\ tar\ xf\ /tmp/firefox.tar.bz2
tar xf /tmp/firefox.tar.bz2
-echo \$\ sudo\ ln\ -s\ /usr/local/firefox/firefox\ /usr/local/bin/firefox
-sudo ln -s /usr/local/firefox/firefox /usr/local/bin/firefox
+echo \$\ sudo\ ln\ -s\ /usr/local/firefox/20.0/firefox\ /usr/local/bin/firefox
+sudo ln -s /usr/local/firefox/20.0/firefox /usr/local/bin/firefox
echo \$\ popd
popd
echo -en 'travis_fold:end:install_firefox\r'
View
8 lib/travis/build/script/addons/firefox.rb
@@ -11,12 +11,12 @@ def initialize(script, config)
def before_install
@script.fold('install_firefox') do |script|
script.cmd "echo -e \"\033[33;1mInstalling Firefox v#{@firefox_version}\033[0m\"; ", assert: false, echo: false
- script.cmd "sudo mkdir -p /usr/local/firefox", assert: false
- script.cmd "sudo chown travis /usr/local/firefox", assert: false
+ script.cmd "sudo mkdir -p /usr/local/firefox/#{@firefox_version}", assert: false
+ script.cmd "sudo chown -R travis /usr/local/firefox", assert: false
script.cmd "wget -O /tmp/firefox.tar.bz2 ftp://ftp.mozilla.org/pub/firefox/releases/#{@firefox_version}/linux-x86_64/en-US/firefox-#{@firefox_version}.tar.bz2", assert: false
- script.cmd "pushd /usr/local/firefox", assert: false
+ script.cmd "pushd /usr/local/firefox/#{@firefox_version}", assert: false
script.cmd "tar xf /tmp/firefox.tar.bz2", assert: false
- script.cmd "sudo ln -s /usr/local/firefox/firefox /usr/local/bin/firefox", assert: false
+ script.cmd "sudo ln -s /usr/local/firefox/#{@firefox_version}/firefox /usr/local/bin/firefox", assert: false
script.cmd "popd", assert: false
end
end
View
8 spec/script/addons/firefox_spec.rb
@@ -12,12 +12,12 @@
it 'runs the command' do
script.expects(:fold).with('install_firefox').yields(script)
script.expects(:cmd).with("echo -e \"\033[33;1mInstalling Firefox v20.0\033[0m\"; ", assert: false, echo: false)
- script.expects(:cmd).with("sudo mkdir -p /usr/local/firefox", assert: false)
- script.expects(:cmd).with("sudo chown travis /usr/local/firefox", assert: false)
+ script.expects(:cmd).with("sudo mkdir -p /usr/local/firefox/20.0", assert: false)
+ script.expects(:cmd).with("sudo chown -R travis /usr/local/firefox", assert: false)
script.expects(:cmd).with("wget -O /tmp/firefox.tar.bz2 ftp://ftp.mozilla.org/pub/firefox/releases/20.0/linux-x86_64/en-US/firefox-20.0.tar.bz2", assert: false)
- script.expects(:cmd).with("pushd /usr/local/firefox", assert: false)
+ script.expects(:cmd).with("pushd /usr/local/firefox/20.0", assert: false)
script.expects(:cmd).with("tar xf /tmp/firefox.tar.bz2", assert: false)
- script.expects(:cmd).with("sudo ln -s /usr/local/firefox/firefox /usr/local/bin/firefox", assert: false)
+ script.expects(:cmd).with("sudo ln -s /usr/local/firefox/20.0/firefox /usr/local/bin/firefox", assert: false)
script.expects(:cmd).with("popd", assert: false)
subject
end

0 comments on commit 7385c5c

Please sign in to comment.