epitools 0.5.56 → 0.5.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/epitools/clitools.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00896a8b88645780987dbb029e5f92e2e1d78f39
|
4
|
+
data.tar.gz: 6f3f6106e2ce3e098b3a375ded51071ae6681670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c104baa941fb1e57123be74950e41e9caa13496eff5282ad96ec0fe79425e1eeef22d0c3bf872cca79b51748a1e6b8cb48895ad319a27781f5acc0b24eaddd
|
7
|
+
data.tar.gz: 1d090bb3633b480f66fbbfcebc2557f379746a5a20145ed9809b211e002814932de98bb45053ef9ec71e2296897bc85382fcbbb5627e97fe6cbf03719c86a4c7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.57
|
data/lib/epitools/clitools.rb
CHANGED
@@ -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
|