Skip to content

Commit

Permalink
feat: install short alias (fzz) (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoliveira committed Sep 29, 2023
1 parent 559c893 commit b16a21f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "funzzy"
version = "1.0.1"
version = "1.1.0"
authors = ["Cristian Oliveira <me@cristianoliveira.com>"]
description = "Yet another fancy watcher inspired by entr."
license = "MIT"
Expand All @@ -17,3 +17,12 @@ glob="0.2.11"
notify-debouncer-mini = "0.3.0"
nix = "0.26.2"
#clippy = "*"

[[bin]]
name = "funzzy"
path = "src/main.rs"

# alias
[[bin]]
name = "fzz"
path = "src/main.rs"
8 changes: 5 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ cargo build --target $TARGET --release

ARTIFACT="funzzy-${RELEASE_TAG:?"Missing release tag"}-${TARGET}.tar.gz"

cp target/$TARGET/release/funzzy funzzy
mkdir -p pkg
cp target/$TARGET/release/funzzy pkg
cp target/$TARGET/release/fzz pkg

tar czf "$ARTIFACT" funzzy
tar czf "$ARTIFACT" pkg

# sanity check the file type
file funzzy
file pkg/funzzy
11 changes: 8 additions & 3 deletions linux-install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
VERSION="v1.0.1"
VERSION=$(cat Cargo.toml | grep version | awk -F\" '{print $2}')

echo "Installing funzzy $VERSION"

cd /tmp

wget https://github.com/cristianoliveira/funzzy/releases/download/$VERSION/funzzy-$VERSION-x86_64-unknown-linux-gnu.tar.gz
tar -xf funzzy-$VERSION-x86_64-unknown-linux-gnu.tar.gz
sudo cp funzzy /usr/local/bin

echo "Application was installed in /usr/local/bin. To uninstall just do rm /usr/local/bin/funzzy"
sudo cp pkg/funzzy /usr/local/bin
sudo cp pkg/fzz /usr/local/bin

echo "Cli was installed in /usr/local/bin/funzzy and /usr/local/bin/fzz"
echo "To uninstall just run 'rm /usr/local/bin/funzzy' and 'rm /usr/local/bin/fzz'"
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const VERSION: &str = env!("CARGO_PKG_VERSION");
const USAGE: &str = "
Funzzy the watcher.
Alias:
fzz -> funzzy
Usage:
funzzy [options]
funzzy init
Expand Down

0 comments on commit b16a21f

Please sign in to comment.