rebuild 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -6
- data/lib/rebuild/cli.rb +13 -0
- data/lib/rebuild/version.rb +1 -1
- metadata +2 -3
- data/gempush.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23da9bc1ca1c0d7c3e3c722a523aae8338727e7b
|
4
|
+
data.tar.gz: 161c5d792532a2510d53dcd3f72a1ed7ca3c6760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 999827f9507aed6c03ef74f76d5ca95554eed755cc649a7e4cf8a733dffd43e45fd19373495bb1e4338b250bb71ba37eab640a4814ab5a17d702f3fb852c3eb7
|
7
|
+
data.tar.gz: 2bf8bae7129342b9f4144d3f986569aebfcea031723020d69e25c6830fb90d62e5712e6d23d1618d76598f60018136c924a7265eb470efb194d0ae72b7c4135c
|
data/README.md
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
Development environment bootstrap automation toolkit for OSX
|
4
4
|
|
5
|
-
![](http://pic.k0kubun.com/174syGrQYpdTo0N.gif)
|
6
|
-
|
7
5
|
## What's this?
|
8
6
|
|
9
7
|
`rebuild` allows you to achieve mouse-free command line tools installation in OSX Yosemite.
|
@@ -33,8 +31,6 @@ Your repository will be available at `~/[repository]`.
|
|
33
31
|
|
34
32
|
### Sync multiple environments
|
35
33
|
|
36
|
-
![](http://pic.k0kubun.com/1B8yBClo0bg4W7Q.gif)
|
37
|
-
|
38
34
|
```bash
|
39
35
|
# force update repository by `-f`
|
40
36
|
$ rebuild -f k0kubun/dotfiles
|
@@ -65,8 +61,6 @@ EOS
|
|
65
61
|
|
66
62
|
## Config
|
67
63
|
|
68
|
-
![](http://pic.k0kubun.com/wsrFmSZhBOug1Yj.gif)
|
69
|
-
|
70
64
|
You can skip choosing option by ~/.gitconfig
|
71
65
|
|
72
66
|
```conf
|
data/lib/rebuild/cli.rb
CHANGED
@@ -22,11 +22,14 @@ module Rebuild
|
|
22
22
|
opt.on('-f', '--force-update') { |v| options[:update] = true }
|
23
23
|
opt.on('-d', '--directory=VAL') { |v| options[:directory] = v }
|
24
24
|
opt.on('-s', '--scriptdir=VAL') { |v| options[:scriptdir] = v }
|
25
|
+
opt.on('-k', '--keep-sudo') { |v| options[:keep_sudo] = true }
|
25
26
|
|
26
27
|
args = opt.parse!(ARGV)
|
27
28
|
return show_usage if options[:help]
|
28
29
|
return print_version if options[:version]
|
29
30
|
|
31
|
+
keep_sudo if options[:keep_sudo]
|
32
|
+
|
30
33
|
CommandLineTools.install unless CommandLineTools.installed?
|
31
34
|
License.agree unless License.agreed?
|
32
35
|
|
@@ -46,6 +49,15 @@ module Rebuild
|
|
46
49
|
|
47
50
|
private
|
48
51
|
|
52
|
+
# Vendored from:
|
53
|
+
# https://github.com/mathiasbynens/dotfiles/blob/6e9822e879caed207f743c9eeadbf724610bff02/.osx#L5-L9
|
54
|
+
def keep_sudo
|
55
|
+
system(<<-EOS)
|
56
|
+
sudo -v
|
57
|
+
while true; do sudo -n true; sleep 1; kill -0 #{Process.pid} || exit; done 2>/dev/null &
|
58
|
+
EOS
|
59
|
+
end
|
60
|
+
|
49
61
|
def bootstrap(repo, stdin, options)
|
50
62
|
repo_path = Repository.new(repo, options).fetch
|
51
63
|
primary_scripts = (stdin || options[:dependency] || '').split
|
@@ -95,6 +107,7 @@ module Rebuild
|
|
95
107
|
-h, [--help] Show this
|
96
108
|
-v, [--version] Print version
|
97
109
|
-f, [--force-update] By default, git pull is not executed
|
110
|
+
-k, [--keep-sudo] Keep sudo enabled while execution
|
98
111
|
-d, [--directory=/path/to/clone] Default: ~/PROJECT
|
99
112
|
-s, [--scriptdir=/script/placed/dir] Default: '' (root)
|
100
113
|
|
data/lib/rebuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rebuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unindent
|
@@ -97,7 +97,6 @@ files:
|
|
97
97
|
- README.md
|
98
98
|
- Rakefile
|
99
99
|
- bin/rebuild
|
100
|
-
- gempush.rb
|
101
100
|
- lib/rebuild.rb
|
102
101
|
- lib/rebuild/cli.rb
|
103
102
|
- lib/rebuild/command_line_tools.rb
|