Browse Source

Appropriate installation directory

main 0.4.2
Unbewohnte 3 years ago
parent
commit
1fbd8f7e2e
  1. 2
      Cargo.lock
  2. 4
      Cargo.toml
  3. 4
      install.sh
  4. 4
      src/main.rs

2
Cargo.lock generated

@ -45,7 +45,7 @@ dependencies = [
[[package]]
name = "fumosay"
version = "0.4.0"
version = "0.4.1"
dependencies = [
"clap",
]

4
Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "fumosay"
version = "0.4.1"
version = "0.4.2"
edition = "2018"
authors = ["Unbewohnte | Nikolay Kasyanov <https://github.com/Unbewohnte>"]
description = "Like cowsay, but with soft friends"
@ -10,4 +10,4 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = "~2.33.3"
clap = "~2.33.3"

4
install.sh

@ -1,8 +1,8 @@
#!/bin/bash
# fumosay installation script
FUMOSAY_BIN_DIR_PATH=/usr/bin/
FUMOFILES_DIR_PATH=/usr/share/fumosay/fumofiles/
FUMOSAY_BIN_DIR_PATH=/usr/local/bin/
FUMOFILES_DIR_PATH=/usr/local/share/fumosay/fumofiles/
# create directories
mkdir -p $FUMOSAY_BIN_DIR_PATH && mkdir -p $FUMOFILES_DIR_PATH

4
src/main.rs

@ -7,7 +7,7 @@ const MESSAGE_INDICATOR: &str = "!message";
/// Fumofile name of the default fumo
const FUMO_DEFAULT: &str = "cirno.fumo";
/// Default directory where fumofiles are placed
const DEFAULT_FUMOFILES_DIR: &str = "/usr/share/fumosay/fumofiles/";
const DEFAULT_FUMOFILES_DIR: &str = "/usr/local/share/fumosay/fumofiles/";
/// Returns a resulting string with `MESSAGE_INDICATOR` replaced with given
/// `message`. If `MESSAGE_INDICATOR` is not present in fumofile - the
@ -22,7 +22,7 @@ fn process_message(fumofile_contents: &mut String, message: &str) -> String {
fn main() {
// get command line arguments
let matches = App::new("fumosay")
.version("0.4.1")
.version("0.4.2")
.author("Unbewohnte | Nikolay Kasyanov <https://github.com/Unbewohnte>")
.about("cowsay, but with soft friends")
.arg(

Loading…
Cancel
Save