mirror of
https://github.com/Atsukoro1/ponyfetch.git
synced 2024-11-27 06:17:59 +01:00
feat: 🎸 Readme changes
This commit is contained in:
parent
a6d80fef05
commit
2e831a5251
3 changed files with 7 additions and 121 deletions
55
README.md
55
README.md
|
@ -20,7 +20,8 @@
|
||||||
- [🔧 Using](#-using)
|
- [🔧 Using](#-using)
|
||||||
- [🧪 Requirements for install](#-requirements-for-install)
|
- [🧪 Requirements for install](#-requirements-for-install)
|
||||||
- [⚡ Installing](#-installing)
|
- [⚡ Installing](#-installing)
|
||||||
- [🔨 Compiling](#-compiling)
|
- [📦 with Cargo](#-with-cargo)
|
||||||
|
- [📦 Manually](#-manually)
|
||||||
- [📚 Contributing](#-contributing)
|
- [📚 Contributing](#-contributing)
|
||||||
- [🐎 Adding new ponies](#-adding-new-ponies)
|
- [🐎 Adding new ponies](#-adding-new-ponies)
|
||||||
- [🖥️ Modifying \& Adding code](#️-modifying--adding-code)
|
- [🖥️ Modifying \& Adding code](#️-modifying--adding-code)
|
||||||
|
@ -59,57 +60,15 @@ sudo pacman -S net-tools
|
||||||
|
|
||||||
## ⚡ Installing
|
## ⚡ 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,
|
### 📦 with Cargo
|
||||||
so I'll provide the steps here.
|
|
||||||
|
|
||||||
- 🐧 On Linux
|
|
||||||
|
|
||||||
1. First, create ponyfetch directory like this:
|
|
||||||
```sh
|
```sh
|
||||||
mkdir /usr/share/ponyfetch && mkdir /usr/share/ponyfetch/ponies
|
cargo install ponyfetch
|
||||||
```
|
|
||||||
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"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🔨 Compiling
|
### 📦 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.
|
||||||
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.
|
|
||||||
```
|
|
||||||
|
|
||||||
## 📚 Contributing
|
## 📚 Contributing
|
||||||
|
|
||||||
|
|
22
install.bat
22
install.bat
|
@ -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!
|
|
51
install.sh
51
install.sh
|
@ -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
|
|
Loading…
Reference in a new issue