epitools 0.5.56 → 0.5.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/epitools/clitools.rb +10 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e99c4c632bed20d594d0be23de1a3e4acc1614b9
4
- data.tar.gz: 5b57af34cea2a3525ca2e517b5a5713599a56439
3
+ metadata.gz: 00896a8b88645780987dbb029e5f92e2e1d78f39
4
+ data.tar.gz: 6f3f6106e2ce3e098b3a375ded51071ae6681670
5
5
  SHA512:
6
- metadata.gz: 2c7774db6661a079c9b1b8fff5c15359f824547c1f1c0700c202dc33a95e15b590ec64f5c62e4cde257254e7cedf6b51299f1446cb157bd423f35a05012890a6
7
- data.tar.gz: 0173053ec0038c3066fe04cc5c5bc0ce9120172269c5559fc084c7b7ee7263f43dad514aee643bc8e28db8e2f9d5bac75a119684ee87f76853b0d9975a13c4a2
6
+ metadata.gz: 85c104baa941fb1e57123be74950e41e9caa13496eff5282ad96ec0fe79425e1eeef22d0c3bf872cca79b51748a1e6b8cb48895ad319a27781f5acc0b24eaddd
7
+ data.tar.gz: 1d090bb3633b480f66fbbfcebc2557f379746a5a20145ed9809b211e002814932de98bb45053ef9ec71e2296897bc85382fcbbb5627e97fe6cbf03719c86a4c7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.56
1
+ 0.5.57
@@ -159,3 +159,13 @@ def autoinstall(*packages)
159
159
  cmd(["sudo apt-get install ?", packages.join(' ')])
160
160
  end
161
161
  end
162
+
163
+
164
+ #
165
+ # Re-execute the script using sudo if it's not currently running as root.
166
+ #
167
+ def sudoifnotroot
168
+ unless Process.uid == 0
169
+ exit system("sudo", $PROGRAM_NAME, *ARGV)
170
+ end
171
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epitools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.56
4
+ version: 0.5.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - epitron