Itai-Nelken / aptpac

A simple wrapper for 'pacman' with a syntax similar to 'apt' to help people transitioning to Arch and Arch based distributions like Manjaro.
https://itai-nelken.github.io/aptpac/
MIT License
27 stars 5 forks source link

how to compile C version? + 'learn the commands' mode feature request #2

Closed CleanMachine1 closed 3 years ago

Itai-Nelken commented 3 years ago

cmake.

1) pacman -S cmake make gcc git
2) git clone https://github.com/Itai-Nelken/aptpac.git
3) cd aptpac/C-edition
4) mkdir build, cd build; cmake ..
5) make
run directly without installing: ./aptpac install: sudo make install uninstall: from the build folder, run sudo make uninstall

CleanMachine1 commented 3 years ago

I will create some documentation

Itai-Nelken commented 3 years ago

thanks! please create it in the /C-edition/ folder for now, I'll move it to the root of the repo once I'm happy replacing the bash edition with the C edition.

CleanMachine1 commented 3 years ago

Really impressive code, I was more thinking adding a documentation.txt then having the README.md file using a hyperlink to it

CleanMachine1 commented 3 years ago

I am really interested in this project, I would really want to help you.

I am going to watch this project and do some PR.

I plan on adding more documentation and maybe some help on learning the arch commands rather than just living with aptpac

Also when I first saw this repo, I thought it was an arch cover for apt rather the opposite so I will fix that

Anyway, right now I am going to fix on adding and making the README better

Itai-Nelken commented 3 years ago

Thanks a lot! If you pass over the bash script (as its easier to read) you will probably learn all the commands you need to know.

CleanMachine1 commented 3 years ago

The PR is fully done, I will use aptpac however I shouldn't as I should learn the actual commands through practice

Maybe you should print the command being used whenever a certain one is being done

EG

$ aptpac install gparted

The Arch equivalent is sudo pacman -S gparted

Itai-Nelken commented 3 years ago

Good idea, but I'm going to add it as a 'learn the commands mode'.

CleanMachine1 commented 3 years ago

precisely

Itai-Nelken commented 3 years ago

progress on the 'learning mode':

I added it but you have to add a flag to cmake to compile aptpac with it. the flag is -DLEARN=1 so cmake -DLEAERN=1 ..

I also added the -DCALLCOMMAND="./aptpac so I can change it to aptpac when building a build I want to install. also when compiling a build you should use -DCMAKE_BUILD_TYPE=Release, it removes all the debug stuff and makes a executable that is way smaller.

CleanMachine1 commented 3 years ago

Is it added?

CleanMachine1 commented 3 years ago

Also where are the relevant commits?

Itai-Nelken commented 3 years ago

as of commit 04255b2a4094ff10d4178a759def2627416650d7

Itai-Nelken commented 3 years ago

As of commit ecbe23af9aaa6f4e5817ab99aca3e2a2a3a24957 the bash version has the ability to save the setting! You can turn the setting on by running aptpac --learning-mode=on and turn it off by running aptpac --learning-mode=off. when entering the main while loop, the script will load all the settings and export them to a variable called SETTING, then in a case statement (before the main one) will load each setting. for now it only works with one setting, but I have added the ability to load single settings (not tested yet) so I can implement multiple settings in the future.

Itai-Nelken commented 3 years ago

I'm closing this issue and opening a new one for 'learning mode'.

Itai-Nelken commented 3 years ago

continued in #14