loopless 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c59d1b00f8ad77451decb51a65f3d33a7ecf5dd4
4
- data.tar.gz: a64839c430e65d2f7eba8989703a1909fb7770c1
3
+ metadata.gz: 3324ee8ee39e34761b6c5a1463cdb90a7a68c94f
4
+ data.tar.gz: 2970a64159d34e296751d44712580922a2be8945
5
5
  SHA512:
6
- metadata.gz: a72dc4564697a7c18d57017dd752ea5748b116ad20625db35c6a4018ca625a30c38052801e577a243dff092e6b1937c4a9ca10a7270730e1470880c9188c35bd
7
- data.tar.gz: 653a11acfb4f8351d929db1c944e2f9d2dd817c240e9208a9fa4cc45473a7434b23427eb0e78dfbfb5d4fc0f0570a63626443275c344c4015d5c8c51334219e8
6
+ metadata.gz: d44305e538cf1408cc3841f12cdba956f89e27aad345f5713bf933a19988852e856a1e0a312fb4a837890181082388820bb0efad1f98529b91a64ab2a0d17116
7
+ data.tar.gz: 42900af9644dde2de543d400edb7bc8944a47a3e73c4198f40189f9e401ee25ef9fe7dfb639d8af96f6ea910a7f659673ee025d08c8fd0f8d8d4775975a04ee1
data/README.md CHANGED
@@ -1,18 +1,33 @@
1
1
  loopless
2
2
  ========
3
3
 
4
+ Latest version: %VERSION%
5
+
4
6
  The xforty disk image utility.
5
7
 
6
8
  Fully create bootable disk images without loopback mounts or root.
7
9
 
8
10
  Currently supported on Linux and Mac OS X.
9
11
 
12
+ Install
13
+ -------
14
+
15
+ Loopless can be installed via rubygems:
16
+
17
+ gem install loopless
18
+
19
+ Which will install the ruby library and also install a loopless executable
20
+
21
+ The loopless command line binaries for each platform can also be downloaded from the `linux` and `mac` directories and run directly.
22
+
10
23
  Synopsis
11
24
  --------
12
25
 
26
+ Create a 10GB bootable disk image for use with VirtualBox. This will produce a 10GB disk.img image file and a small disk.vmdk image description file.
27
+
13
28
  On the command line
14
29
 
15
- loopless disk.img create 10000000000 # 10GB
30
+ loopless disk.img create 10000000000
16
31
  loopless disk.img create-gpt
17
32
  loopless disk.img create-part
18
33
  loopless disk.img part-info
@@ -70,7 +85,7 @@ loopless is comprised of a number of subcommands:
70
85
 
71
86
  PART may either be a single number indicating GPT part number or a comma separated byte range
72
87
 
73
- FILE must be the absolute path to file, including the initial '/'
88
+ PATH must be the absolute path to file, including the initial '/'
74
89
 
75
90
  * `loopless FILE[:PART] mkfs [ LABEL ]`
76
91
 
@@ -80,15 +95,15 @@ FILE must be the absolute path to file, including the initial '/'
80
95
 
81
96
  List all files in filesystem
82
97
 
83
- * `loopless FILE[:PART] rm FILE`
98
+ * `loopless FILE[:PART] rm PATH`
84
99
 
85
100
  Delete file and recursively remove empty directories.
86
101
 
87
- * `loopless FILE[:PART] read FILE`
102
+ * `loopless FILE[:PART] read PATH`
88
103
 
89
104
  Print file to stdout
90
105
 
91
- * `loopless FILE[:PART] write FILE MODE`
106
+ * `loopless FILE[:PART] write PATH MODE`
92
107
 
93
108
  Overwrites file with content from stdin. Will also chmod the file to the given MODE and
94
109
  recursively chmod parent directories with MODE + the executable bit set where the read bit is
data/darwin/loopless CHANGED
Binary file
data/lib/loopless.rb CHANGED
@@ -42,7 +42,7 @@ module Loopless
42
42
  end
43
43
 
44
44
  def self.create_part(file, part_num: nil, start: nil, size: nil, label: nil)
45
- run file, 'create-part', *[part_num,start,size,label].compact.map(&:to_s)
45
+ run file, 'create-part', *[part_num||0,start||0,size||0,label].compact.map(&:to_s)
46
46
  nil
47
47
  end
48
48
 
@@ -74,8 +74,20 @@ module Loopless
74
74
  nil
75
75
  end
76
76
 
77
- def self.mkfs(file,part=nil)
78
- run_part file,part,'mkfs'
77
+ def self.mkfs(file,*args)
78
+ part = nil
79
+ label = []
80
+ if args.size == 1
81
+ if args[0].is_a?(Array) || args[0].is_a?(Integer)
82
+ part = args[0]
83
+ else
84
+ label = args
85
+ end
86
+ elsif args.size == 2
87
+ part,label[0] = *args
88
+ end
89
+
90
+ run_part file,part,'mkfs', *label
79
91
  nil
80
92
  end
81
93
 
@@ -92,7 +104,7 @@ module Loopless
92
104
  run_part file,part,'read',fix_path(path)
93
105
  end
94
106
 
95
- def self.write(file,*args)#part=nil,path,perm='644',input)
107
+ def self.write(file,*args)
96
108
  part = nil
97
109
  perm = '644'
98
110
  case args.size
data/linux/loopless CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loopless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Edlefsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-16 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Fully creat bootable disk images without loopback mounts or root.
14
14
  email: matt@xforty.com