-
Notifications
You must be signed in to change notification settings - Fork 12
Streamlining Setup: Introducing a Makefile for Effortless Dependency Management and Installation #15
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
base: master
Are you sure you want to change the base?
Streamlining Setup: Introducing a Makefile for Effortless Dependency Management and Installation #15
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Define the dependencies | ||
| DEPENDENCIES = chafa convert jq curl | ||
|
|
||
| # Define the installation directories | ||
| INSTALL_DIR = /usr/local | ||
|
|
||
| # Installation instructions | ||
| install: check_dependencies | ||
| @echo "\033[1;32m Installing... \033[0m" | ||
| sudo mkdir -pv $(INSTALL_DIR) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are |
||
| sudo cp -rv bin $(INSTALL_DIR) | ||
| sudo cp -rv share $(INSTALL_DIR) | ||
| @echo "Installation complete." | ||
| @echo "updating your $PATH variable" | ||
|
|
||
| @echo -e "\033[1;32m DONE \033[0m pokeshell is now installed" | ||
| @echo -e "\033[1;32m RELOAD YOUR SHELL BEFORE USING POKESHELL \033[0m" | ||
|
Comment on lines
+14
to
+17
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script is not updating the $PATH as far as I can tell, please remove line 14. Since it is not updating the $PATH, reloading will not do anything. pokeshell will work as long as |
||
|
|
||
| # Uninstallation instructions | ||
| uninstall: | ||
| @echo "Uninstalling..." | ||
|
|
||
| @echo "Removing files" | ||
| sudo rm -rf $(INSTALL_DIR)/bin/pokeshell | ||
| @echo "Removing Complitions" | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spelling |
||
| sudo rm -rf $(INSTALL_DIR)/share/bash-completion/completions/pokeshell | ||
|
Comment on lines
+24
to
+26
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the |
||
|
|
||
| @echo -e "Removing directories " | ||
| sudo rmdir -v $(INSTALL_DIR)/bin | ||
| sudo rmdir -v $(INSTALL_DIR)/share/bash-completion/completions | ||
| sudo rmdir -v $(INSTALL_DIR)/share/bash-completion | ||
|
|
||
| @echo -e "\033[1;31m pokeshell uninstalled \033[1;32m OK \033[0m" | ||
|
|
||
| # Target to check dependencies | ||
| check_dependencies: | ||
| @echo "Checking dependencies..." | ||
| @for dep in $(DEPENDENCIES); do \ | ||
| command -v $$dep >/dev/null 2>&1 || { echo "$$dep is required but not installed. Aborting."; exit 1; }; \ | ||
| done | ||
|
|
||
|
|
||
| .PHONY: install uninstall check_dependencies | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,21 +15,21 @@ Key features include: | |
|
|
||
| ## Installation | ||
|
|
||
| You can install pokeshell system-wide with the `install.sh` script like so: | ||
| You can install pokeshell system-wide with the `make install` command like so: | ||
| ```bash | ||
| sudo ./install.sh | ||
| make install | ||
| ``` | ||
|
|
||
| This will allow you to run `pokeshell` anywhere on your system as well as add | ||
| shell completions. | ||
|
|
||
| An uninstall script is also provided: | ||
| An uninstalltion is also provided: | ||
|
Comment on lines
+24
to
+26
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spelling |
||
| ```bash | ||
| sudo ./uninstall.sh | ||
| make uninstall | ||
| ``` | ||
|
|
||
| If you do not want to install then you can still run pokeshell anywhere | ||
| by adding the following lines to your `~/.bashrc`. | ||
| by just colning the repo and adding the path to repo to your $PATH variable by adding the following lines to your `~/.bashrc`. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spelling, use backticks around $PATH. |
||
|
|
||
| ```bash | ||
| export PATH=/path/to/pokeshell:$PATH | ||
|
|
@@ -38,7 +38,10 @@ export PATH=/path/to/pokeshell:$PATH | |
| ## Usage | ||
|
|
||
| ```bash | ||
| pokeshell --help | ||
|
|
||
| pokeshell -a random s:pikachu-gmax" | ||
|
|
||
| for more options $ pokeshell --help | ||
|
Comment on lines
-41
to
+44
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the example here, that is what |
||
| ``` | ||
|
|
||
| or if running from this directory: | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convertshould beimagemagickI believe.