renamed from pokerust to rustmon
This commit is contained in:
parent
ab34e78bfb
commit
315f968e6e
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
- name: Upload Arch package
|
- name: Upload Arch package
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: pokerust.pkg.tar.zst
|
name: rustmon.pkg.tar.zst
|
||||||
path: ./build/arch/*.pkg.tar
|
path: ./build/arch/*.pkg.tar
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
@ -53,5 +53,5 @@ jobs:
|
||||||
- name: Upload Debian package
|
- name: Upload Debian package
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: pokerust.deb
|
name: rustmon.deb
|
||||||
path: build/debian/pokerust.deb
|
path: build/debian/rustmon.deb
|
||||||
|
|
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -135,17 +135,6 @@ version = "1.19.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pokerust"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"clap",
|
|
||||||
"once_cell",
|
|
||||||
"rand",
|
|
||||||
"rust-embed",
|
|
||||||
"serde_json",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ppv-lite86"
|
name = "ppv-lite86"
|
||||||
version = "0.2.17"
|
version = "0.2.17"
|
||||||
|
@ -234,6 +223,17 @@ dependencies = [
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustmon"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"clap",
|
||||||
|
"once_cell",
|
||||||
|
"rand",
|
||||||
|
"rust-embed",
|
||||||
|
"serde_json",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.17"
|
version = "1.0.17"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pokerust"
|
name = "rustmon"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
clap = "2.0.0"
|
clap = "2.0.0"
|
||||||
rand = "0.8"
|
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
once_cell = "1.8.0"
|
once_cell = "1.8.0"
|
||||||
rust-embed = "8.3.0"
|
rust-embed = "8.3.0"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# PokeRust
|
# Rustmon
|
||||||
|
|
||||||
*For educational purposes*
|
*For educational purposes*
|
||||||
A simple colorscript written in Rust.
|
A simple colorscript written in Rust.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pkgname=pokerust-git
|
pkgname=rustmon-git
|
||||||
pkgdesc="Pokemon Colorscripts written in Rust"
|
pkgdesc="Pokemon Colorscripts written in Rust"
|
||||||
_gitname=pokerust
|
_gitname=rustmon
|
||||||
pkgver=r22.ceb9133
|
pkgver=r23.ab34e78
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/Vomitblood/$_gitname"
|
url="https://github.com/Vomitblood/$_gitname"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
# TODO: check for rust dependency
|
# TODO: check for rust dependency
|
||||||
|
|
||||||
# create a directory structure that mirrors tha final structure of the installed package
|
# create a directory structure that mirrors tha final structure of the installed package
|
||||||
mkdir -p pokerust/DEBIAN
|
mkdir -p rustmon/DEBIAN
|
||||||
mkdir -p pokerust/usr/bin
|
mkdir -p rustmon/usr/bin
|
||||||
|
|
||||||
# build the executable
|
# build the executable
|
||||||
cd ../..
|
cd ../..
|
||||||
|
@ -12,20 +12,20 @@ cargo build --release
|
||||||
cd build/debian
|
cd build/debian
|
||||||
|
|
||||||
# copy the executable
|
# copy the executable
|
||||||
cp ../../target/release/pokerust pokerust/usr/bin/
|
cp ../../target/release/rustmon rustmon/usr/bin/
|
||||||
|
|
||||||
# create the control file
|
# create the control file
|
||||||
touch pokerust/DEBIAN/control
|
touch rustmon/DEBIAN/control
|
||||||
|
|
||||||
# edit the control file
|
# edit the control file
|
||||||
echo "Package: pokerust
|
echo "Package: rustmon
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Maintainer: Vomitblood <tohyouxuan@gmail.com>
|
Maintainer: Vomitblood <tohyouxuan@gmail.com>
|
||||||
Description: "Pokemon Colorscripts written in Rust"" > pokerust/DEBIAN/control
|
Description: "Pokemon Colorscripts written in Rust"" > rustmon/DEBIAN/control
|
||||||
|
|
||||||
# actually build the thing
|
# actually build the thing
|
||||||
echo $(pwd)
|
echo $(pwd)
|
||||||
dpkg-deb --build pokerust
|
dpkg-deb --build rustmon
|
|
@ -1,4 +1,6 @@
|
||||||
use rand::prelude::SliceRandom;
|
use rand::prelude::SliceRandom;
|
||||||
|
use rand::rngs::SmallRng;
|
||||||
|
use rand::SeedableRng;
|
||||||
use rust_embed::RustEmbed;
|
use rust_embed::RustEmbed;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
|
||||||
|
@ -8,7 +10,7 @@ struct ColorScriptsDir;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let files: Vec<_> = ColorScriptsDir::iter().collect();
|
let files: Vec<_> = ColorScriptsDir::iter().collect();
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = SmallRng::from_entropy();
|
||||||
|
|
||||||
if let Some(random_file) = files.choose(&mut rng) {
|
if let Some(random_file) = files.choose(&mut rng) {
|
||||||
println!("{}", random_file);
|
println!("{}", random_file);
|
||||||
|
|
Loading…
Reference in a new issue