Provided you have go installed, use this oneliner in the command-line (should work cross-platform, if not simply clone the repo and run go build
):
git clone https://github.com/Depermitto/HeaderPuller && go build -C ./HeaderPuller -o "$(go env GOPATH)/bin/hp" && rm -rf ./HeaderPuller/
Upon pulling a file, a package log file called hp.yaml shall be created. This is the core of the package managing functionality. Every remove or pull operation will modify the content of this file, to keep everything in check. Deleting include folders without using hp commands and calling sync is undefined behaviour.
For any doubts, please refer to the help
command of hp.
Pull single/multi header libraries from git repositories. There are 3 variations of this command:
- pull
repo-link
- providing the repo link will copy every valid file fromrepo-link/include
toinclude
- pull
repo-link
file
- will copy that exact file if valid fromrepo-link
toinclude
- pull
repo-link
from
- will copy every valid file fromrepo-link/from
tofrom
, which is by defaultinclude
Pull a fantastic random number generating single-header library written in C++ (the https:// part may be omitted):
hp pull https://github.com/Depermitto/randshow |
workspace
+-- include
| +-- randshow.hpp
+-- hp.yaml
...
List all installed packages along with their identifiers in id: package name format. Ids correspond to order the packages have been added by and names are git repository names stripped of the author.
hp list |
0: randshow
Removes files and folders of all header files encompassing a package. There are 3 variations of this command:
- remove
id
- delete by id - remove
name
- remove by package name - remove
repo-link
- remove by repository link
The ids and packages names are provided by the list
command.
hp rm 0 |
workspace
+-- hp.yaml
...
The sync
command simply pulls every package in hp.yaml and overwrites overlapping content, effectively updating every package to the latest version.
The update
command will automagically update the tool to the latest git commit.
The wipe
command removes all pulled packages and the hp.yaml file itself. Does not remove hp tool from the computer. For that functionality refer to uninstall
.
Upon confirmation, wipes hp from the computer entirely
- [X] Update README to the newest version of software
- [X] Fix <repo-link>/<header> pulling (e.g. miniaudio)
- [X] Implement wiping whole hp.yaml
- [X] Fix
sync
command to ignore already downloaded packages - [X] Make it possible to
wipe
an empty hp.yaml - [X] Upgrade itself
- [X] Clean up codebase
- [ ] Add comments