File tree Expand file tree Collapse file tree 6 files changed +271
-277
lines changed
Expand file tree Collapse file tree 6 files changed +271
-277
lines changed Original file line number Diff line number Diff line change 1- name : Build ArKr
1+ name : Build FPM
22
33on :
44 push :
@@ -27,10 +27,10 @@ jobs:
2727
2828 steps :
2929 - uses : actions/checkout@v4
30- - name : Compile ArKr
31- run : g++ ./arkr .cpp -o arkr
32- - name : Upload ArKr binary
30+ - name : Compile FPM
31+ run : g++ ./fpm .cpp -o fpm
32+ - name : Upload FPM binary
3333 uses : actions/upload-artifact@v4
3434 with :
35- name : arkr -binary
36- path : ./arkr
35+ name : fpm -binary
36+ path : ./fpm
Original file line number Diff line number Diff line change 1- # ArKr (Argonium Kryptonide)
2- This is an ongoing project for my GNU/Linux distribution known as Krypton.
1+ # Foo's Package Manager
32
4- If you don't want to compile then you can look at the Actions tab.
5- ## Compiling
6- You are a dingus. Come on, just compile the special file named "arkr.cpp" using g++.
3+ ## Introduction
4+ Foo's Package Manager is a package manager for Linux systems. It is designed to be simple and easy to use, while still being fast and efficient.
75
8- Currently the only supported compiler is g++, but if you want to use another one, then be aware that there might be some bugs.
6+
7+ ## Installation
8+ For now, you need to compile the source code yourself. You can do this by running the following commands:
9+
10+ ``` bash
11+ git clone https://github.com/Tarvey/fpm.git
12+ cd fpm
13+ g++ ./fpm.cpp -o fpm
14+ ```
15+
16+ ## Usage
17+ For now, there is no documentation. You can look through the source code to see how it works.
18+
19+ ## Contributing
20+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
21+
22+ Please make sure to update tests as appropriate.
23+
24+ ## License
25+ [ MIT] ( https://choosealicense.com/licenses/mit/ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #include " fpm.hpp"
2+ #include < iostream>
3+ #include < stdexcept>
4+
5+ using namespace std ;
6+
7+ int main (int argc, char * argv[]) {
8+ if (argc < 2 ) {
9+ cerr << " Usage: " << argv[0 ] << " <in|out|configure|about> [args]" << endl;
10+ return 1 ;
11+ }
12+ try {
13+ string action = argv[1 ];
14+ if (action == " in" || action == " i" ) {
15+ if (argc < 3 ) throw invalid_argument (" Missing package name for installation" );
16+ fpm::install_package (argv[2 ]);
17+ } else if (action == " out" || action == " o" ) {
18+ if (argc < 3 ) throw invalid_argument (" Missing package name for uninstallation" );
19+ fpm::uninstall_package (argv[2 ]);
20+ } else if (action == " configure" || action == " c" ) {
21+ if (!fpm::is_root ()) throw runtime_error (" Failed to run! Are you root?" );
22+ if (argc < 4 ) throw invalid_argument (" Invalid configure command" );
23+ string typeStr = argv[2 ];
24+ int type = (typeStr == " config" ) ? 1 : (typeStr == " dir" ) ? 2 : (typeStr == " diruser" ) ? 3 : 0 ;
25+ fpm::configure_system (type, argv[3 ]);
26+ } else if (action == " about" ) {
27+ fpm::print_about ();
28+ } else if (action==" fasturl" ){
29+ cout << fpm::findbestmirror () << endl;
30+ } else {
31+ cerr << " Invalid action: " << action << endl;
32+ return 1 ;
33+ }
34+
35+ } catch (const exception& e) {
36+ cerr << " Error: " << e.what () << endl;
37+ return 1 ;
38+ }
39+ return 0 ;
40+ }
You can’t perform that action at this time.
0 commit comments