getch 0.1.2 → 0.1.9
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
- checksums.yaml.gz.sig +0 -0
- data/README.md +66 -32
- data/assets/network-stack.conf +63 -0
- data/assets/system.conf +38 -0
- data/bin/getch +12 -4
- data/lib/cmdline.rb +128 -0
- data/lib/getch/command.rb +32 -22
- data/lib/getch/config/gentoo.rb +58 -0
- data/lib/getch/config/void.rb +47 -0
- data/lib/getch/config.rb +45 -0
- data/lib/getch/filesystem/clean.rb +22 -15
- data/lib/getch/filesystem/device.rb +8 -6
- data/lib/getch/filesystem/ext4/config.rb +8 -4
- data/lib/getch/filesystem/ext4/deps.rb +3 -1
- data/lib/getch/filesystem/ext4/device.rb +2 -3
- data/lib/getch/filesystem/ext4/encrypt/config.rb +15 -11
- data/lib/getch/filesystem/ext4/encrypt/deps.rb +5 -10
- data/lib/getch/filesystem/ext4/encrypt/device.rb +5 -3
- data/lib/getch/filesystem/ext4/encrypt/format.rb +4 -2
- data/lib/getch/filesystem/ext4/encrypt/mount.rb +3 -3
- data/lib/getch/filesystem/ext4/encrypt/partition.rb +29 -35
- data/lib/getch/filesystem/ext4/encrypt/void.rb +101 -0
- data/lib/getch/filesystem/ext4/encrypt.rb +3 -0
- data/lib/getch/filesystem/ext4/format.rb +4 -1
- data/lib/getch/filesystem/ext4/mount.rb +3 -0
- data/lib/getch/filesystem/ext4/partition.rb +11 -8
- data/lib/getch/filesystem/ext4/void.rb +44 -0
- data/lib/getch/filesystem/ext4.rb +3 -0
- data/lib/getch/filesystem/lvm/config.rb +10 -29
- data/lib/getch/filesystem/lvm/deps.rb +7 -11
- data/lib/getch/filesystem/lvm/device.rb +5 -3
- data/lib/getch/filesystem/lvm/encrypt/config.rb +17 -17
- data/lib/getch/filesystem/lvm/encrypt/deps.rb +8 -12
- data/lib/getch/filesystem/lvm/encrypt/device.rb +7 -5
- data/lib/getch/filesystem/lvm/encrypt/format.rb +5 -2
- data/lib/getch/filesystem/lvm/encrypt/mount.rb +4 -2
- data/lib/getch/filesystem/lvm/encrypt/partition.rb +17 -13
- data/lib/getch/filesystem/lvm/encrypt/void.rb +101 -0
- data/lib/getch/filesystem/lvm/encrypt.rb +3 -0
- data/lib/getch/filesystem/lvm/format.rb +4 -1
- data/lib/getch/filesystem/lvm/mount.rb +3 -0
- data/lib/getch/filesystem/lvm/partition.rb +10 -7
- data/lib/getch/filesystem/lvm/void.rb +46 -0
- data/lib/getch/filesystem/lvm.rb +3 -0
- data/lib/getch/filesystem/mount.rb +19 -12
- data/lib/getch/filesystem/partition.rb +19 -11
- data/lib/getch/filesystem/zfs/config.rb +10 -24
- data/lib/getch/filesystem/zfs/deps.rb +28 -58
- data/lib/getch/filesystem/zfs/device.rb +9 -1
- data/lib/getch/filesystem/zfs/encrypt/config.rb +12 -28
- data/lib/getch/filesystem/zfs/encrypt/deps.rb +29 -60
- data/lib/getch/filesystem/zfs/encrypt/device.rb +9 -1
- data/lib/getch/filesystem/zfs/encrypt/format.rb +24 -22
- data/lib/getch/filesystem/zfs/encrypt/mount.rb +15 -14
- data/lib/getch/filesystem/zfs/encrypt/partition.rb +24 -18
- data/lib/getch/filesystem/zfs/encrypt/void.rb +97 -0
- data/lib/getch/filesystem/zfs/encrypt.rb +3 -0
- data/lib/getch/filesystem/zfs/format.rb +21 -18
- data/lib/getch/filesystem/zfs/mount.rb +12 -13
- data/lib/getch/filesystem/zfs/partition.rb +20 -15
- data/lib/getch/filesystem/zfs/void.rb +81 -0
- data/lib/getch/filesystem/zfs.rb +3 -0
- data/lib/getch/filesystem.rb +2 -0
- data/lib/getch/gentoo/boot.rb +29 -67
- data/lib/getch/gentoo/bootloader.rb +68 -0
- data/lib/getch/gentoo/chroot.rb +26 -29
- data/lib/getch/gentoo/config.rb +69 -31
- data/lib/getch/gentoo/sources.rb +73 -38
- data/lib/getch/gentoo/stage.rb +12 -13
- data/lib/getch/gentoo/use.rb +39 -0
- data/lib/getch/gentoo/use_flag.rb +89 -0
- data/lib/getch/gentoo.rb +39 -21
- data/lib/getch/guard.rb +71 -0
- data/lib/getch/helpers.rb +180 -48
- data/lib/getch/log.rb +10 -7
- data/lib/getch/options.rb +50 -41
- data/lib/getch/states.rb +10 -3
- data/lib/getch/version.rb +1 -1
- data/lib/getch/void/boot.rb +84 -0
- data/lib/getch/void/chroot.rb +56 -0
- data/lib/getch/void/config.rb +90 -0
- data/lib/getch/void/stage.rb +69 -0
- data/lib/getch/void.rb +65 -0
- data/lib/getch.rb +125 -74
- data.tar.gz.sig +0 -0
- metadata +28 -10
- metadata.gz.sig +0 -0
- data/.gitignore +0 -2
- data/CHANGELOG.md +0 -80
- data/Rakefile +0 -21
- data/bin/setup.sh +0 -90
- data/getch.gemspec +0 -25
data/bin/setup.sh
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
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 --noconfirm libyaml ruby ruby-irb ruby-reline rubygems
|
|
30
|
-
elif hash emerge 2>/dev/null ; then
|
|
31
|
-
emerge -av dev-lang/ruby
|
|
32
|
-
elif hash apt-get 2>/dev/null ; then
|
|
33
|
-
apt-get install ruby
|
|
34
|
-
else
|
|
35
|
-
compile_ruby
|
|
36
|
-
fi
|
|
37
|
-
fi
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
install_with_gem() {
|
|
41
|
-
gem install getch
|
|
42
|
-
getch -h
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
dll_test_version() {
|
|
46
|
-
echo "Downloading the test version..."
|
|
47
|
-
cd /tmp
|
|
48
|
-
[ -f ./getch.tar.gz ] && rm ./getch.tar.gz
|
|
49
|
-
[ -d ./getch-master ] && rm -rf ./getch-master
|
|
50
|
-
|
|
51
|
-
curl -s -L -o getch.tar.gz https://github.com/szorfein/getch/archive/master.tar.gz
|
|
52
|
-
tar xzf getch.tar.gz \
|
|
53
|
-
&& cd $DIR \
|
|
54
|
-
&& ruby -I lib bin/getch -h
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
get_getch() {
|
|
58
|
-
if hash gem 2>/dev/null ; then
|
|
59
|
-
printf "Which version? [1] stable , [2] test (no recommended) " ; read -r
|
|
60
|
-
if echo "$REPLY" | grep -qP "2" ; then
|
|
61
|
-
dll_test_version
|
|
62
|
-
else
|
|
63
|
-
install_with_gem
|
|
64
|
-
fi
|
|
65
|
-
else
|
|
66
|
-
dll_test_version
|
|
67
|
-
fi
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
set_shell() {
|
|
71
|
-
your_shell=~/.bashrc
|
|
72
|
-
[ -f ~/.zshrc ] && your_shell=~/.zshrc
|
|
73
|
-
|
|
74
|
-
[ -f "$your_shell" ] && {
|
|
75
|
-
if ! grep -q "ruby" "$your_shell" ; then
|
|
76
|
-
echo "export PATH=\$PATH:$(ruby -e 'puts Gem.user_dir')/bin" >> "$your_shell"
|
|
77
|
-
fi
|
|
78
|
-
if $(. "$your_shell") ; then
|
|
79
|
-
echo "Shell loaded"
|
|
80
|
-
fi
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
main() {
|
|
85
|
-
search_ruby
|
|
86
|
-
set_shell
|
|
87
|
-
get_getch
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
main "$@"
|
data/getch.gemspec
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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 CLI tool to install Gentoo"
|
|
7
|
-
s.authors = ["szorfein"]
|
|
8
|
-
s.email = ["szorfein@protonmail.com"]
|
|
9
|
-
s.homepage = 'https://github.com/szorfein/getch'
|
|
10
|
-
s.metadata = {
|
|
11
|
-
"changelog_uri" => "https://github.com/szorfein/getch/blob/master/CHANGELOG.md",
|
|
12
|
-
"bug_tracker_uri" => "https://github.com/szorfein/getch/issues",
|
|
13
|
-
"wiki_uri" => "https://github.com/szorfein/getch"
|
|
14
|
-
}
|
|
15
|
-
s.license = "MIT"
|
|
16
|
-
s.required_ruby_version = '>=2.5'
|
|
17
|
-
|
|
18
|
-
s.files = `git ls-files`.split(" ")
|
|
19
|
-
s.files.reject! { |fn| fn.include? "certs" }
|
|
20
|
-
|
|
21
|
-
s.executables = [ 'getch' ]
|
|
22
|
-
|
|
23
|
-
s.cert_chain = ['certs/szorfein.pem']
|
|
24
|
-
s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
|
|
25
|
-
end
|