Browse files

use different page for upgrade_nx.rb since link disappeared

  • Loading branch information...
1 parent 6804c46 commit 540d0825163d17b196b617a97cea144c66be9f06 Relevance Pair committed Oct 1, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 scripts/upgrade_nx.rb
View
6 scripts/upgrade_nx.rb
@@ -1,8 +1,10 @@
#!/usr/bin/env ruby
require 'open-uri'
-body = open("http://www.nomachine.com/preview/download-package.php?Prod_Id=1").read
-package_uri = body[%r{http:.*?amd64\.deb}] or abort "Uri for debian package not found!"
+body = open("http://www.nomachine.com/preview/download-package.php?Prod_Id=3").read
+package_uri = body[%r{http:.*?nxserver[^/]+\.deb}] or abort "Uri for debian package not found!"
+# since we don't get the amd64 uri directly
+package_uri.sub!('i386', 'amd64')
package_basename = package_uri[/nxserver.*\.deb$/] or abort "No basename for debian package found!"
puts "Installing latest package: #{package_uri}\n\n"

0 comments on commit 540d082

Please sign in to comment.