mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Add snowflake package (#5878)
This commit is contained in:
@@ -100,6 +100,7 @@ Latest Packages
|
|||||||
|
|
||||||
| Name | Description | Date Added |
|
| Name | Description | Date Added |
|
||||||
|:---|:---|:---|
|
|:---|:---|:---|
|
||||||
|
| snowflake | Snowflake (aka Muon) is a graphical SSH client. | 2021-06-19 |
|
||||||
| fd | A simple, fast and user-friendly alternative to find | 2021-06-08 |
|
| fd | A simple, fast and user-friendly alternative to find | 2021-06-08 |
|
||||||
| rdfind | Redundant data find - a program that finds duplicate files. | 2021-06-07 |
|
| rdfind | Redundant data find - a program that finds duplicate files. | 2021-06-07 |
|
||||||
| libcurl | Command line tool and library for transferring data with URLs. | 2021-06-07 |
|
| libcurl | Command line tool and library for transferring data with URLs. | 2021-06-07 |
|
||||||
@@ -109,7 +110,6 @@ Latest Packages
|
|||||||
| gcloud | Command-line interface for Google Cloud Platform products and services | 2021-05-23 |
|
| gcloud | Command-line interface for Google Cloud Platform products and services | 2021-05-23 |
|
||||||
| upx | Extendable, high-performance executable packer for several executable formats | 2021-05-20 |
|
| upx | Extendable, high-performance executable packer for several executable formats | 2021-05-20 |
|
||||||
| ucl | Portable lossless data compression library written in ANSI C | 2021-05-20 |
|
| ucl | Portable lossless data compression library written in ANSI C | 2021-05-20 |
|
||||||
| source_highlight | Convert source code to syntax highlighted document | 2021-05-17 |
|
|
||||||
|
|
||||||
Chat with us!
|
Chat with us!
|
||||||
-------------
|
-------------
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Libxfont2 < Package
|
|||||||
x86_64: '2de5392e181a0f94794b888eec55bc35b0e26cb8f69ca0f77394b9d7e887ef1b',
|
x86_64: '2de5392e181a0f94794b888eec55bc35b0e26cb8f69ca0f77394b9d7e887ef1b',
|
||||||
})
|
})
|
||||||
|
|
||||||
depends_on 'fop'
|
depends_on 'fop' => :build
|
||||||
depends_on 'libxtrans'
|
depends_on 'libxtrans'
|
||||||
depends_on 'libfontenc'
|
depends_on 'libfontenc'
|
||||||
depends_on 'libx11'
|
depends_on 'libx11'
|
||||||
|
|||||||
57
packages/snowflake.rb
Normal file
57
packages/snowflake.rb
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
require 'package'
|
||||||
|
|
||||||
|
class Snowflake < Package
|
||||||
|
description 'Snowflake (aka Muon) is a graphical SSH client.'
|
||||||
|
homepage 'https://github.com/subhra74/snowflake'
|
||||||
|
version '1.0.4'
|
||||||
|
license 'GPL-3'
|
||||||
|
compatibility 'x86_64'
|
||||||
|
source_url 'SKIP'
|
||||||
|
|
||||||
|
binary_url ({
|
||||||
|
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/snowflake/1.0.4_x86_64/snowflake-1.0.4-chromeos-x86_64.tpxz',
|
||||||
|
})
|
||||||
|
binary_sha256 ({
|
||||||
|
x86_64: '4e524ad28ef440ded64cb667b188ced01d662fc8240d85be39cc7319a306e99f',
|
||||||
|
})
|
||||||
|
|
||||||
|
depends_on 'jdk11'
|
||||||
|
depends_on 'sommelier'
|
||||||
|
|
||||||
|
def self.build
|
||||||
|
snowflake = <<~EOF
|
||||||
|
#!/bin/bash
|
||||||
|
cd #{CREW_PREFIX}/share/snowflake
|
||||||
|
java -jar snowflake.jar "$@"
|
||||||
|
EOF
|
||||||
|
File.write('snowflake.sh', snowflake)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.install
|
||||||
|
system "curl -L#o snowflake.jar https://github.com/subhra74/snowflake/releases/download/v#{version}/snowflake.jar"
|
||||||
|
abort 'Checksum mismatch. 😔 Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('snowflake.jar') ) == 'cc1768e5ce7038d26a893e00066e4d8bed2f42c1ba75b960b324471c5eab74c1'
|
||||||
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
|
||||||
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/snowflake"
|
||||||
|
FileUtils.mv 'snowflake.jar', "#{CREW_DEST_PREFIX}/share/snowflake"
|
||||||
|
FileUtils.install 'snowflake.sh', "#{CREW_DEST_PREFIX}/bin/snowflake", mode: 0o755
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.postinstall
|
||||||
|
puts "\nType 'snowflake' to get started.\n".lightblue
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.remove
|
||||||
|
config_dir = "#{HOME}/snowflake-ssh"
|
||||||
|
if Dir.exists? config_dir
|
||||||
|
puts "WARNING: This will remove all saved ssh sessions!".orange
|
||||||
|
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
||||||
|
case STDIN.getc
|
||||||
|
when "y", "Y"
|
||||||
|
FileUtils.rm_rf config_dir
|
||||||
|
puts "#{config_dir} removed.".lightred
|
||||||
|
else
|
||||||
|
puts "#{config_dir} saved.".lightgreen
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user