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
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pokerust.pkg.tar.zst
|
||||
name: rustmon.pkg.tar.zst
|
||||
path: ./build/arch/*.pkg.tar
|
||||
|
||||
build:
|
||||
|
@ -53,5 +53,5 @@ jobs:
|
|||
- name: Upload Debian package
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pokerust.deb
|
||||
path: build/debian/pokerust.deb
|
||||
name: rustmon.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"
|
||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||
|
||||
[[package]]
|
||||
name = "pokerust"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"once_cell",
|
||||
"rand",
|
||||
"rust-embed",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
|
@ -234,6 +223,17 @@ dependencies = [
|
|||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustmon"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"once_cell",
|
||||
"rand",
|
||||
"rust-embed",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.17"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[package]
|
||||
name = "pokerust"
|
||||
name = "rustmon"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
clap = "2.0.0"
|
||||
rand = "0.8"
|
||||
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||
serde_json = "1.0"
|
||||
once_cell = "1.8.0"
|
||||
rust-embed = "8.3.0"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# PokeRust
|
||||
# Rustmon
|
||||
|
||||
*For educational purposes*
|
||||
A simple colorscript written in Rust.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pkgname=pokerust-git
|
||||
pkgname=rustmon-git
|
||||
pkgdesc="Pokemon Colorscripts written in Rust"
|
||||
_gitname=pokerust
|
||||
pkgver=r22.ceb9133
|
||||
_gitname=rustmon
|
||||
pkgver=r23.ab34e78
|
||||
pkgrel=1
|
||||
arch=('x86_64')
|
||||
url="https://github.com/Vomitblood/$_gitname"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# TODO: check for rust dependency
|
||||
|
||||
# create a directory structure that mirrors tha final structure of the installed package
|
||||
mkdir -p pokerust/DEBIAN
|
||||
mkdir -p pokerust/usr/bin
|
||||
mkdir -p rustmon/DEBIAN
|
||||
mkdir -p rustmon/usr/bin
|
||||
|
||||
# build the executable
|
||||
cd ../..
|
||||
|
@ -12,20 +12,20 @@ cargo build --release
|
|||
cd build/debian
|
||||
|
||||
# copy the executable
|
||||
cp ../../target/release/pokerust pokerust/usr/bin/
|
||||
cp ../../target/release/rustmon rustmon/usr/bin/
|
||||
|
||||
# create the control file
|
||||
touch pokerust/DEBIAN/control
|
||||
touch rustmon/DEBIAN/control
|
||||
|
||||
# edit the control file
|
||||
echo "Package: pokerust
|
||||
echo "Package: rustmon
|
||||
Version: 1.0.0
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
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
|
||||
echo $(pwd)
|
||||
dpkg-deb --build pokerust
|
||||
dpkg-deb --build rustmon
|
|
@ -1,4 +1,6 @@
|
|||
use rand::prelude::SliceRandom;
|
||||
use rand::rngs::SmallRng;
|
||||
use rand::SeedableRng;
|
||||
use rust_embed::RustEmbed;
|
||||
use std::str;
|
||||
|
||||
|
@ -8,7 +10,7 @@ struct ColorScriptsDir;
|
|||
|
||||
fn main() {
|
||||
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) {
|
||||
println!("{}", random_file);
|
||||
|
|
Loading…
Reference in a new issue