xcode-install 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/xcode/install.rb +16 -2
- data/lib/xcode/install/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95ef7ef854f22068da4b6d17fbd0eeec9bd7083b
|
|
4
|
+
data.tar.gz: a2f55e7e0ae0110d06c2cfac22645e31d696b06e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39598493738e22334ffee03e5c4e96cb3aac39d2cdb1640441a24a038f8e6cbf7a00c441783f6d44e83ec630cca68a51f45f0cc6ead5e59a6228fbb4aadf8d4a
|
|
7
|
+
data.tar.gz: 34467afe0c9238147e88bbd0e1e47a08c5537758688d09b01680c97004bc48b00e943f01d92766ed081217c1524e9faa519f4d4690c943131bd865aded32c984
|
data/lib/xcode/install.rb
CHANGED
|
@@ -74,12 +74,26 @@ module XcodeInstall
|
|
|
74
74
|
def install_dmg(dmg_path, suffix = '', switch = true, clean = true)
|
|
75
75
|
archive_util = '/System/Library/CoreServices/Applications/Archive Utility.app/Contents/MacOS/Archive Utility'
|
|
76
76
|
prompt = "Please authenticate for Xcode installation.\nPassword: "
|
|
77
|
-
xcode_beta_path = dmg_path.dirname + 'Xcode-beta.app'
|
|
78
77
|
xcode_path = "/Applications/Xcode#{suffix}.app"
|
|
79
78
|
|
|
80
79
|
if dmg_path.extname == '.xip'
|
|
81
80
|
`'#{archive_util}' #{dmg_path}`
|
|
82
|
-
|
|
81
|
+
xcode_orig_path = dmg_path.dirname + 'Xcode.app'
|
|
82
|
+
xcode_beta_path = dmg_path.dirname + 'Xcode-beta.app'
|
|
83
|
+
if Pathname.new(xcode_orig_path).exist?
|
|
84
|
+
`sudo -p "#{prompt}" mv "#{xcode_orig_path}" "#{xcode_path}"`
|
|
85
|
+
elsif Pathname.new(xcode_beta_path).exist?
|
|
86
|
+
`sudo -p "#{prompt}" mv "#{xcode_beta_path}" "#{xcode_path}"`
|
|
87
|
+
else
|
|
88
|
+
out = <<-HELP
|
|
89
|
+
No `Xcode.app(or Xcode-beta.app)` found in XIP. Please remove #{dmg_path} if you
|
|
90
|
+
suspect a corrupted download or run `xcversion update` to see if the version
|
|
91
|
+
you tried to install has been pulled by Apple. If none of this is true,
|
|
92
|
+
please open a new GH issue.
|
|
93
|
+
HELP
|
|
94
|
+
$stderr.puts out.tr("\n", ' ')
|
|
95
|
+
return
|
|
96
|
+
end
|
|
83
97
|
else
|
|
84
98
|
mount_dir = mount(dmg_path)
|
|
85
99
|
source = Dir.glob(File.join(mount_dir, 'Xcode*.app')).first
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xcode-install
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Boris Bügling
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: claide
|