Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added build instructions in README.md #21

Merged
merged 5 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,42 @@ Currently, these distributions have existing packages for HyFetch:
* Nix: `nix-env -i hyfetch` (Thanks to @ YisuiDenghua)
* Guix: `guix install hyfetch` (Thanks to @ WammKD)

### Method 3: Install using git and python

Run the following commands:
```sh
git clone https://github.com/hykilpikonna/hyfetch.git
cd hyfetch
sudo python setup.py install
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using setup.py install is not recommended because it cannot be uninstalled easily. Should use pip install . instead.

https://stackoverflow.com/questions/1550226/python-setup-py-uninstall

```

## Usage

When you run `hyfetch` for the first time, it will prompt you to choose a color system and a preset. Just follow the prompt, and everything should work (hopefully). If something doesn't work, feel free to submit an issue!

If you want to use the updated `neofetch` without LGBTQ flags, check out [this section](https://github.com/hykilpikonna/hyfetch#running-updated-original-neofetch)

## Contributing

### Building Hyfetch

clone the git repository using:
`git clone https://github.com/hykilpikonna/hyfetch.git`

cd into the repository's directory

cd into the "tools" directory

run the following command:
`./buildAndClean.sh`

### Running the build

go into the root of the hyfetch directory and run the following command:
`python runner.py`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I wrote runner.py before I knew that modules can be executed with python -m {module}. So now you can run hyfetch from source by running python -m hyfetch from project root without building or using runner.py.

I can delete runner.py afterwards


## Questions and answers

#### Q: How do I change my config?

A: Use `hyfetch -c`
Expand Down
12 changes: 12 additions & 0 deletions tools/buildAndClean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# Stop on error
set -e

# Remove old build
rm -rf ../dist/*
rm -rf ../build/*

# Build
cd ..
python setup.py sdist bdist_wheel
5 changes: 3 additions & 2 deletions tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
set -e

# Remove old build
rm -rf dist/*
rm -rf build/*
rm -rf ../dist/*
rm -rf ../build/*

# Build
cd ..
Comment on lines -7 to +11
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry that I haven't clarified how to use the scripts in the tools directory.

When I wrote the deploy script, I didn't intend for it to be run in the tools directory. The original paths work if you run ./tools/deploy.sh in the root directory for this repo. This applies to all other scripts in tools as well

python setup.py sdist bdist_wheel

# Check built files
Expand Down