From 2e831a5251809c14351b95e68d8f641153411254 Mon Sep 17 00:00:00 2001 From: Atsukoro1 Date: Mon, 5 Dec 2022 13:32:47 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Readme=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 55 +++++++---------------------------------------------- install.bat | 22 --------------------- install.sh | 51 ------------------------------------------------- 3 files changed, 7 insertions(+), 121 deletions(-) delete mode 100644 install.bat delete mode 100755 install.sh diff --git a/README.md b/README.md index 3821ec3..3232aec 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ - [๐Ÿ”ง Using](#-using) - [๐Ÿงช Requirements for install](#-requirements-for-install) - [โšก Installing](#-installing) -- [๐Ÿ”จ Compiling](#-compiling) + - [๐Ÿ“ฆ with Cargo](#-with-cargo) + - [๐Ÿ“ฆ Manually](#-manually) - [๐Ÿ“š Contributing](#-contributing) - [๐ŸŽ Adding new ponies](#-adding-new-ponies) - [๐Ÿ–ฅ๏ธ Modifying \& Adding code](#๏ธ-modifying--adding-code) @@ -59,57 +60,15 @@ sudo pacman -S net-tools ## โšก Installing -If you don't want to compile this tool by yourself, it's possible to just download current build [right here](https://github.com/Atsukoro1/ponyfetch/releases). +There are multiple possible ways to install Ponyfetch, however, there is still a way to compile it yourself. If you want, please proceed with reading Compiling section. -If you're installing the binary yourself, the install script is useless for you since the directory paths are completely different, -so I'll provide the steps here. - -- ๐Ÿง On Linux - -1. First, create ponyfetch directory like this: +### ๐Ÿ“ฆ with Cargo ```sh -mkdir /usr/share/ponyfetch && mkdir /usr/share/ponyfetch/ponies -``` -1. Download the ponies from this Github repo amd move them to the ponies directory. -2. Move the binary to /usr/bin and /bin - -- ๐Ÿ–ฅ๏ธ On Windows - -1. Create ponyfetch directories like this: -```sh -md C:\Program Files\Ponyfetch -md C:\Program Files\Ponyfetch\ponies\ -``` -2. Download the ponies from this Github repo and move them to the ponies directory. -3. Move the executable to "C:\\Program Files\\Ponyfetch" -4. Add the directory mentioned in previous step to the path like this: -```sh -setx /M path "%path%;C:\Program Files\Ponyfetch" +cargo install ponyfetch ``` -## ๐Ÿ”จ Compiling - -Make sure you have [rust compiler and build tools](https://www.rust-lang.org/tools/install) installed. - -I've made it easy for you, just cd into project folder and run this shell script. - -- ๐Ÿง On Linux - -```sh -chmod +x ./install.sh && sudo ./install.sh -``` - -- ๐Ÿ–ฅ๏ธ On Windows - -```sh -./install.bat -``` - -- ๐ŸŽ On Mac - -```txt -(WIP) Ponyfetch was never tested on Mac and it's stability can't be guaranteed. -``` +### ๐Ÿ“ฆ Manually +To install the latest version of PonyFetch, first visit the available release [here](https://github.com/Atsukoro1/ponyfetch/releases) and download the executable. For Linux, move the binary to the /usr/bin directory. For Windows, move the binary to any desired path and add it to your system's PATH environment variable. ## ๐Ÿ“š Contributing diff --git a/install.bat b/install.bat deleted file mode 100644 index 6b37aa4..0000000 --- a/install.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -set PONY_DIR="C:\Program Files\Ponyfetch\" -set IMAGES_DIR=%PONY_DIR%ponies - -:compile_tool -echo Compiling Ponyfetch... -cargo build --release - -:createdirectories -echo Creating directories... -if not exist %PONY_DIR% mkdir %PONY_DIR% -if not exist %IMAGES_DIR% mkdir %IMAGES_DIR% - -:copyfiles -echo Copying files... -xcopy /s ponies\ %IMAGES_DIR% -copy target\release\ponyfetch.exe %PONY_DIR% - -:setpath -echo Setting PATH... -set PATH=%PATH%;%PONY_DIR% -echo Done! \ No newline at end of file diff --git a/install.sh b/install.sh deleted file mode 100755 index cf12765..0000000 --- a/install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -function configure() { - echo "Configuring..." - rustup default stable -} - -function makeDirectories() { - echo "Creating required directories..." - - if [ ! -d "/usr/share/ponyfetch" ]; then - mkdir /usr/share/ponyfetch - mkdir /usr/share/ponyfetch/ponies - fi -} - -function compile() { - echo "Compiling ponyfetch..." - - if [ ! -f "/usr/bin/ponyfetch" ]; then - cargo build --release - fi -} - -function moveFiles() { - echo "Moving files..." - - rm -rf /usr/bin/ponyfetch - rm -rf /bin/ponyfetch - cp ./target/release/ponyfetch /usr/bin/ponyfetch - - toCopyCount=$(ls -1 /usr/share/ponyfetch/ponies/*.txt 2>/dev/null | wc -l) - dirCount=$(ls -1 ponies/*.txt 2>/dev/null | wc -l) - - if [ $toCopyCount != $dirCount ]; then - cp -r ponies/* /usr/share/ponyfetch/ponies - fi -} - -if [ "$EUID" -ne 0 ] - then echo "Please run as root" - exit -fi - -echo "Thanks for choosing ponyfetch!" -echo "Let's begin installing!" - -configure -makeDirectories -compile -moveFiles \ No newline at end of file