From ab525d476b56c03a1ce1d3e672da9afa81a80398 Mon Sep 17 00:00:00 2001 From: ShivangSrivastava Date: Sun, 2 Feb 2025 23:55:52 +0530 Subject: [PATCH 1/4] Improve installation: Use /usr/local/bin & simplify manual install --- README.md | 4 +--- install.sh | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 21829b6b..2f73d1d1 100644 --- a/README.md +++ b/README.md @@ -82,9 +82,7 @@ cargo install rascii_art > GNU/Linux or any other POSIX compatible systems! ```sh -git clone https://github.com/KoBruhh/RASCII && cd RASCII -chmod +x install.sh -./install.sh +curl -sL https://raw.githubusercontent.com/orhnk/RASCII/refs/heads/master/install.sh | sh ``` ## Using The Crate diff --git a/install.sh b/install.sh index 31d4a9ea..ddfc0522 100755 --- a/install.sh +++ b/install.sh @@ -1,11 +1,11 @@ #!/bin/sh -echo "Sudo is needed to copy the binary to /usr/bin - prompting now." +echo "Sudo is needed to copy the binary to /usr/local/bin - prompting now." sudo true cargo build --release -sudo cp ./target/release/rascii /usr/bin +sudo cp ./target/release/rascii /usr/local/bin echo "RASCII has been successfully installed on your system. You can run From b5b81d24d0ad19c836e4918c099ad4f5ee827ab1 Mon Sep 17 00:00:00 2001 From: ShivangSrivastava Date: Mon, 3 Feb 2025 00:03:17 +0530 Subject: [PATCH 2/4] Added and to --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index ddfc0522..9c470a74 100755 --- a/install.sh +++ b/install.sh @@ -3,6 +3,9 @@ echo "Sudo is needed to copy the binary to /usr/local/bin - prompting now." sudo true +git clone https://github.com/orhnk/RASCII +cd RASCII + cargo build --release sudo cp ./target/release/rascii /usr/local/bin From 111cb37cbfd4dcb1f410318c7f81f1d5b1f0582d Mon Sep 17 00:00:00 2001 From: ShivangSrivastava Date: Mon, 3 Feb 2025 00:05:23 +0530 Subject: [PATCH 3/4] Added 'git clone' and 'cd RASCII' to 'install.sh' --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 9c470a74..945bbf63 100755 --- a/install.sh +++ b/install.sh @@ -4,6 +4,7 @@ echo "Sudo is needed to copy the binary to /usr/local/bin - prompting now." sudo true git clone https://github.com/orhnk/RASCII + cd RASCII cargo build --release From daf2b73326597525b4e93485192750ee1484b1f1 Mon Sep 17 00:00:00 2001 From: Shivang Srivastava <114788987+ShivangSrivastava@users.noreply.github.com> Date: Thu, 13 Feb 2025 04:12:14 +0530 Subject: [PATCH 4/4] Update install.sh Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 945bbf63..75319a52 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,15 @@ echo "Sudo is needed to copy the binary to /usr/local/bin - prompting now." sudo true -git clone https://github.com/orhnk/RASCII +if [ -d "RASCII" ]; then + echo "Error: RASCII directory already exists" + exit 1 +fi + +if ! git clone https://github.com/orhnk/RASCII; then + echo "Error: Failed to clone RASCII repository" + exit 1 +fi cd RASCII