startor 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/startor +17 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1664fc2c72796a1421de0cd3a2ef46c770d5eb51f1027cc77b723492c8d76bd
|
4
|
+
data.tar.gz: 0471f2f135dd8d55bd510c9b0316d846471f583208ac46c4ff2531696133d376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20f0881fc5e5a4394a2c65e90dac099c2223f88bfb02d579633416b6da304ff071c3a598db7fc9f10566ca74709b5939c024c703cd94ebb31efc00e6094eac3
|
7
|
+
data.tar.gz: d0c6f0ac45641c0cc81f9bbeed6dfe98c716046008871761e5c5060354ee6db4fec7c62367c152bc45f9480a04d6b72dd673c0c13a0f3226cf92d0a49a67ffb9
|
data/bin/startor
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# startor
|
3
3
|
|
4
4
|
# 20181107
|
5
|
-
# 0.6.
|
5
|
+
# 0.6.2
|
6
6
|
|
7
7
|
# History: Derived from https://kremalicious.com/simple-tor-setup-on-mac-os-x/...
|
8
8
|
|
@@ -48,6 +48,12 @@
|
|
48
48
|
# 7. Updated lib/Version.rb, so that: /require 'String/capture'/require 'Thoran/String/Capture/capture'/, which I should have done as of startor 0.3.0 when gathering the libraries, since that post-dates the change to Version.rb.
|
49
49
|
# 8. - lib/String/capture.rb
|
50
50
|
# 9. ~ .gitignore: + *.gem, so that gem builds don't go in the repo without me having to remove them manually when I do `git add .`.
|
51
|
+
# 2/3
|
52
|
+
# Don't install homebrew or tor needlessly if issuing `startor setup`...
|
53
|
+
# 10. + homebrew_installed?()
|
54
|
+
# 11. ~ install_homebrew() to make use of homebrew_installed?().
|
55
|
+
# 12. ~ install_tor() to make use of tor_installed?(), though this is a bit redundant, since setup() should control whether install_tor() is run anyway.
|
56
|
+
# 13. ~ setup(), so that it doesn't needlessly install brew, because tor is already installed.
|
51
57
|
|
52
58
|
require 'FileUtils/which'
|
53
59
|
require 'Kernel/run'
|
@@ -55,7 +61,7 @@ require 'OSX/HardwarePort'
|
|
55
61
|
require 'OSX/IfConfig'
|
56
62
|
|
57
63
|
def install_homebrew
|
58
|
-
if
|
64
|
+
if homebrew_installed?
|
59
65
|
puts 'Homebrew is already installed!'
|
60
66
|
else
|
61
67
|
run('/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"', show: true)
|
@@ -63,7 +69,7 @@ def install_homebrew
|
|
63
69
|
end
|
64
70
|
|
65
71
|
def install_tor
|
66
|
-
if
|
72
|
+
if tor_installed?
|
67
73
|
puts 'tor is already installed!'
|
68
74
|
else
|
69
75
|
run('brew install tor', show: true)
|
@@ -71,14 +77,20 @@ def install_tor
|
|
71
77
|
end
|
72
78
|
|
73
79
|
def setup
|
74
|
-
|
75
|
-
|
80
|
+
unless tor_installed?
|
81
|
+
install_homebrew
|
82
|
+
install_tor
|
83
|
+
end
|
76
84
|
end
|
77
85
|
|
78
86
|
def tor_installed?
|
79
87
|
FileUtils.which('tor')
|
80
88
|
end
|
81
89
|
|
90
|
+
def homebrew_installed?
|
91
|
+
FileUtils.which('brew')
|
92
|
+
end
|
93
|
+
|
82
94
|
def check_for_tor_program
|
83
95
|
unless tor_installed?
|
84
96
|
puts "tor was not found. You must install tor first."
|