winsub_cli 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8443dbf209f66589cca90231fb6136e218c6dabdc8ad281cdf1d50e838b33f51
4
+ data.tar.gz: d35b7d9dc7177b727bf2c91ab94902735e11804eb8306aee3778bb5bc2059695
5
+ SHA512:
6
+ metadata.gz: 3e5da1f555fecd299f0aaac782bb185df131fdee69a6f7e4c818482dffaecc3bc2e3b9c6ca7ddea1f3913d886348c74fcc2f56db3f63a1ecb64c4d64697c3687
7
+ data.tar.gz: 49d1997f7ae17f77c32d31894a4400cce80e6d073bd7a3f8b5c8e2aee395d08d8c3ec2c207385beb5cebcaf361c4f19ef47ab523a4e13b887f652c7dfa466826
data/bin/install_ ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ require 'ubuntu/install'
3
+ if(ARGV[0] == 'ubuntu')
4
+ UbuntuInstall.new
5
+ else
6
+ puts "You can use it for installing ubuntu subsystem"
7
+ end
data/bin/nano_ ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ require 'util/nano'
data/bin/vi_ ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ require 'util/vim'
@@ -0,0 +1,23 @@
1
+ class UbuntuInstall
2
+ def initialize
3
+ install
4
+ end
5
+ private
6
+ def install
7
+ puts "check whether you cmd with adminitrative right"
8
+ print "Are you sure want to install ubuntu? "
9
+ confirmation = STDIN.gets.chomp
10
+ case(confirmation)
11
+ when 'y','Y','yes','YES','Y'
12
+ %x(@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin")
13
+ system "choco upgrade chocolatey"
14
+ system "choco upgrade chocolatey"
15
+ system "choco install wsl-ubuntu-1804"
16
+ else
17
+ puts "Installation aborted"
18
+ end
19
+
20
+ end
21
+
22
+
23
+ end
data/lib/util/nano.rb ADDED
@@ -0,0 +1 @@
1
+ system "bash -c 'nano .'"
data/lib/util/vim.rb ADDED
@@ -0,0 +1 @@
1
+ system "bash -c 'vi .'"
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: winsub_cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - imhtapm
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: command line utilities for windows subsystem, and you use for installing
14
+ ubuntu wsl in windows
15
+ email: imhtapm@gmail.com
16
+ executables:
17
+ - nano_
18
+ - vi_
19
+ - install_
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - bin/install_
24
+ - bin/nano_
25
+ - bin/vi_
26
+ - lib/ubuntu/install.rb
27
+ - lib/util/nano.rb
28
+ - lib/util/vim.rb
29
+ homepage: https://rubygems.org/gems/winsub_cli
30
+ licenses:
31
+ - MIT
32
+ metadata:
33
+ source_code_uri: https://github.com/imhta/winsub_cli
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubygems_version: 3.0.3
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: command line utilities for install and manage windows subsystem
53
+ test_files: []