Top Level Namespace
Defined Under Namespace
Classes: ConflictingEntry, Erase, Fetch, IncompleteError, MismatchedHash, PackageDataBase, PackageList
Instance Method Summary collapse
-
#extract(filename) ⇒ Object
You should have received a copy of the GNU Lesser General Public License along with Post.
- #runs_on_this?(arch) ⇒ Boolean
Instance Method Details
#extract(filename) ⇒ Object
You should have received a copy of the GNU Lesser General Public License along with Post. If not, see <www.gnu.org/licenses/>.
16 17 18 19 20 |
# File 'lib/tools.rb', line 16 def extract(filename) system("mv #{filename} #{filename}.xz") system("unxz #{filename}.xz") system("tar xf #{filename}") end |
#runs_on_this?(arch) ⇒ Boolean
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/packagedata.rb', line 22 def runs_on_this?(arch) platform = RbConfig::CONFIG['host_cpu'] if platform == 'x86_64' complist = ['i386', 'i486', 'i686', 'x86_64'] elsif platform == 'i686' complist = ['i386', 'i486', 'i686'] elsif platform == 'i486' complist = ['i386', 'i486', 'i686'] else complist = platform end if complist.include?(arch) return true else return false end end |