path-install 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/.bash_profile +4 -0
- data/exe/path-install +32 -0
- data/lib/path/install.rb +7 -0
- data/lib/path/install/version.rb +5 -0
- data/path-install.gemspec +25 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 403f15c5f5fb74a8da1b1ea0f322ade64024920fd1d1419bcc9a70574b8e30fc
|
4
|
+
data.tar.gz: e1e83e3c62d6dbc25c8322462a3b684883c82468a9636116761b308850352337
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5b8e8a63bdbd290ee9f0ccc6004f25b0b1c7862b7cf7515b777fa32016c21d070e9fd21510a17cddde4c6c4f553ab18b6f74b52afabb2851ee79e78ece7454ee
|
7
|
+
data.tar.gz: 4e5af6e33feee98aefb4323f2ceadab635bc57fe7cd2aeaf8c26ba5dae548569a6cbb0cd7c56d42fa21f52f1641dd32343722f3e4d3d9baf071f658fabdd5528
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 s3fxn
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# path-install
|
2
|
+
|
3
|
+
path-install can help you adding a new PATH to .bash_profile and /etc/profile.d/ .
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install path-install
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
$ path-install file or directory...
|
12
|
+
|
13
|
+
```
|
14
|
+
$ path-install /usr/local/ruby2.5.1/bin | tee -a ~/.bash_profile
|
15
|
+
export PATH=/usr/local/ruby2.5.1/bin:$PATH
|
16
|
+
|
17
|
+
$ path-install /usr/local/ruby2.5.1/bin/ruby | sudo tee -a /etc/profile.d/ruby.sh
|
18
|
+
test -x /usr/local/ruby2.5.1/bin/ruby && \
|
19
|
+
export PATH=/usr/local/ruby2.5.1/bin:$PATH
|
20
|
+
|
21
|
+
```
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/path-install.
|
26
|
+
|
27
|
+
## License
|
28
|
+
|
29
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "path/install"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/.bash_profile
ADDED
data/exe/path-install
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
if ARGV == []
|
4
|
+
puts
|
5
|
+
puts "Usage: path-install file or directory..."
|
6
|
+
puts
|
7
|
+
puts "$ path-install /usr/local/ruby2.5.1/bin | tee -a ~/.bash_profile"
|
8
|
+
puts "export PATH=/usr/local/ruby2.5.1/bin:$PATH"
|
9
|
+
puts
|
10
|
+
puts "$ path-install /usr/local/ruby2.5.1/bin/ruby | sudo tee -a /etc/profile.d/ruby.sh"
|
11
|
+
puts "test -x /usr/local/ruby2.5.1/bin/ruby && \\"
|
12
|
+
puts "export PATH=/usr/local/ruby2.5.1/bin:$PATH"
|
13
|
+
puts
|
14
|
+
exit 1
|
15
|
+
end
|
16
|
+
|
17
|
+
ARGV.each {|path|
|
18
|
+
if FileTest.directory? path
|
19
|
+
path = File.expand_path('.', path)
|
20
|
+
puts "export PATH=#{path}:\$PATH"
|
21
|
+
|
22
|
+
elsif FileTest.file? path and FileTest.executable? path
|
23
|
+
file = File.expand_path('.', path)
|
24
|
+
path = File.dirname(path)
|
25
|
+
puts "test -x #{file} && \\"
|
26
|
+
puts "export PATH=#{path}:\$PATH"
|
27
|
+
|
28
|
+
else
|
29
|
+
puts "# skip: #{path}"
|
30
|
+
end
|
31
|
+
}
|
32
|
+
|
data/lib/path/install.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "path/install/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "path-install"
|
8
|
+
spec.version = Path::Install::VERSION
|
9
|
+
spec.authors = ["s3fxn"]
|
10
|
+
spec.email = ["sssfxn@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{path-install can help you adding a new PATH to .bash_profile and /etc/profile.d/}
|
13
|
+
spec.homepage = "https://github.com/s3fxn/path-install"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: path-install
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- s3fxn
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description:
|
42
|
+
email:
|
43
|
+
- sssfxn@gmail.com
|
44
|
+
executables:
|
45
|
+
- ".bash_profile"
|
46
|
+
- path-install
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- ".gitignore"
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- bin/console
|
56
|
+
- bin/setup
|
57
|
+
- exe/.bash_profile
|
58
|
+
- exe/path-install
|
59
|
+
- lib/path/install.rb
|
60
|
+
- lib/path/install/version.rb
|
61
|
+
- path-install.gemspec
|
62
|
+
homepage: https://github.com/s3fxn/path-install
|
63
|
+
licenses:
|
64
|
+
- MIT
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.7.6
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: path-install can help you adding a new PATH to .bash_profile and /etc/profile.d/
|
86
|
+
test_files: []
|