getch 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ab4a85424380fa152f9d5e764799ab85f44c2bcc09a74f0e8d8ba80278f7b880
4
+ data.tar.gz: 586e590f3a66d81382193c4e1d0c8735165c39b6d4ef6eed8846aa620fd03a8b
5
+ SHA512:
6
+ metadata.gz: 2262f40341744f5d9128ae1372c48c3f1d762054cc600ca202f406e8b6d4c4d2912be157d0af08f61bc039b894e7c3825ff87a7a8ef2070e2411eb21f747aba0
7
+ data.tar.gz: 854f785d9cee4e03b1e724881483ae3f9f69388ee0079dcf1c2ed057eb0b98d81236948b170fe6cc1b985f991f8ac13316c48417a943f68f67c3a20a9c9dbbaf
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ # Getch
2
+ A script to install Gentoo.
3
+
4
+ # Install
5
+
6
+ # curl https://raw.githubusercontent.com/szorfein/getch/master/bin/setup.sh | sh
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'getch'
4
+
5
+ Getch::main(ARGV)
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env sh
2
+
3
+ set -o errexit -o nounset
4
+
5
+ DIR=/tmp/getch-master
6
+ PATH=${PATH}:/tmp/ruby/bin
7
+
8
+ # last snapshot https://www.ruby-lang.org/en/downloads/
9
+ compile_ruby() {
10
+ PN=ruby
11
+ PV=2.7
12
+ [ -f /tmp/$PN_$PV.tar.gz ] || curl -s -L -o /tmp/$PN_$PV.tar.gz https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-$PN_$PV.tar.gz
13
+ [ -d /tmp/snapshot-$PN_$PV ] || {
14
+ cd /tmp
15
+ tar xvf $PN_$PV.tar.gz
16
+ }
17
+ cd snapshot-$PN_$PV
18
+ ./configure --prefix=/tmp/$PN
19
+ make
20
+ make install
21
+ }
22
+
23
+ search_ruby() {
24
+ if hash ruby 2>/dev/null ; then
25
+ echo "Ruby $(ruby -v | awk '{print $2}') found"
26
+ else
27
+ echo "Install ruby"
28
+ if hash pacman 2>/dev/null ; then
29
+ pacman -Syy
30
+ pacman -S --needed ruby
31
+ elif hash emerge 2>/dev/null ; then
32
+ emerge -av dev-lang/ruby
33
+ elif hash apt-get 2>/dev/null ; then
34
+ apt-get install ruby
35
+ else
36
+ compile_ruby
37
+ fi
38
+ fi
39
+ }
40
+
41
+ get_getch() {
42
+ cd /tmp
43
+ [ -f ./getch.tar.gz ] && rm ./getch.tar.gz
44
+ [ -d ./getch-master ] && rm -rf ./getch-master
45
+
46
+ curl -s -L -o getch.tar.gz https://github.com/szorfein/getch/archive/master.tar.gz
47
+ tar xzf getch.tar.gz
48
+ }
49
+
50
+ main() {
51
+ get_getch
52
+ search_ruby
53
+ cd $DIR \
54
+ && ruby -I lib bin/getch
55
+ }
56
+
57
+ main "$@"
@@ -0,0 +1,21 @@
1
+ require File.dirname(__FILE__) + "/lib/getch/version"
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "getch"
5
+ s.version = Getch::VERSION
6
+ s.summary = "A script to install Gentoo"
7
+ s.authors = ["szorfein"]
8
+ s.email = ["szorfein@protonmail.com"]
9
+ s.homepage = 'https://github.com/szorfein/getch'
10
+ s.license = "MIT"
11
+ s.required_ruby_version = '>=2.5'
12
+
13
+ s.files = `git ls-files`.split(" ")
14
+ s.files.reject! { |fn| fn.include? "certs" }
15
+
16
+ s.executables = [ 'getch' ]
17
+
18
+
19
+ s.cert_chain = ['certs/szorfein.pem']
20
+ s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
21
+ end
@@ -0,0 +1,5 @@
1
+ module Getch
2
+ def self.main(argv)
3
+ puts "Starting..."
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module Getch
2
+ VERSION = '0.0.1'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: getch
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.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
+ BBswGYEXc3pvcmZlaW5AcHJvdG9ubWFpbC5jb20wDQYJKoZIhvcNAQELBQADggGB
28
+ AG4K1ZJdzcVABSnVuD83z5ne9eBlrYscHHSXev5FX32jFdKxl19FQ+eorjSOTsNq
29
+ SIgKneQOKdsWIlv8M6NDiUDcc1s504fOpIVtMbP+6n47hBGz4bzGlAdtvTO1PewK
30
+ tW6ii8TOCOJ3Pv6bTzQlsaQrADi2MHuVHTb14H7uoSFJNzfU4sYJn1C3PRMC3G7n
31
+ Qe/zVOdMf0bkwBnfQNojbwx3Vy1jr2JSQWjK25NYimpuKV0skanU0iBiqru6VCbK
32
+ zhDNufCgCnWLwXXET3onVQMZsiLTUFf30BXX7PY1O0Km15MQn1HzOecJ3ZIDBWtS
33
+ d/lg1MHB7+/FQAY5FujZqvVv5i2M9wLx+7N4ONRA7MsWD86hLiYN68QeRsHI+LNf
34
+ AnVdw7i28f3GhZldcdllblGeTOjSfwl9wL4yBb1UwVjvcwMR5SDed0yPmHPXBiAC
35
+ J/zT/q2Ac7BWpSLbv6p9lChBiEnD9j24x463LR5QQjDNS5SsjzRQfFuprsa9Nqf2
36
+ Tw==
37
+ -----END CERTIFICATE-----
38
+ date: 2020-09-10 00:00:00.000000000 Z
39
+ dependencies: []
40
+ description:
41
+ email:
42
+ - szorfein@protonmail.com
43
+ executables:
44
+ - getch
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - README.md
49
+ - bin/getch
50
+ - bin/setup.sh
51
+ - getch.gemspec
52
+ - lib/getch.rb
53
+ - lib/getch/version.rb
54
+ homepage: https://github.com/szorfein/getch
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '2.5'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubygems_version: 3.1.3
74
+ signing_key:
75
+ specification_version: 4
76
+ summary: A script to install Gentoo
77
+ test_files: []
Binary file