Browse Source

Appropriate installation directory

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

2
Cargo.lock generated

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

2
Cargo.toml

@ -1,6 +1,6 @@
[package] [package]
name = "fumosay" name = "fumosay"
version = "0.4.1" version = "0.4.2"
edition = "2018" edition = "2018"
authors = ["Unbewohnte | Nikolay Kasyanov <https://github.com/Unbewohnte>"] authors = ["Unbewohnte | Nikolay Kasyanov <https://github.com/Unbewohnte>"]
description = "Like cowsay, but with soft friends" description = "Like cowsay, but with soft friends"

4
install.sh

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# fumosay installation script # fumosay installation script
FUMOSAY_BIN_DIR_PATH=/usr/bin/ FUMOSAY_BIN_DIR_PATH=/usr/local/bin/
FUMOFILES_DIR_PATH=/usr/share/fumosay/fumofiles/ FUMOFILES_DIR_PATH=/usr/local/share/fumosay/fumofiles/
# create directories # create directories
mkdir -p $FUMOSAY_BIN_DIR_PATH && mkdir -p $FUMOFILES_DIR_PATH 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 /// Fumofile name of the default fumo
const FUMO_DEFAULT: &str = "cirno.fumo"; const FUMO_DEFAULT: &str = "cirno.fumo";
/// Default directory where fumofiles are placed /// 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 /// Returns a resulting string with `MESSAGE_INDICATOR` replaced with given
/// `message`. If `MESSAGE_INDICATOR` is not present in fumofile - the /// `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() { fn main() {
// get command line arguments // get command line arguments
let matches = App::new("fumosay") let matches = App::new("fumosay")
.version("0.4.1") .version("0.4.2")
.author("Unbewohnte | Nikolay Kasyanov <https://github.com/Unbewohnte>") .author("Unbewohnte | Nikolay Kasyanov <https://github.com/Unbewohnte>")
.about("cowsay, but with soft friends") .about("cowsay, but with soft friends")
.arg( .arg(

Loading…
Cancel
Save