-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from cmaker-dev/dev
Dev
- Loading branch information
Showing
49 changed files
with
4,137 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
rm -rf ./_deps ./CMakeCache.txt ./CMakeFiles | ||
rm -rf ./_deps ./CMakeCache.txt ./CMakeFiles build/* | ||
make clean | ||
rm -rf ./Makefile | ||
sudo xargs rm -rf < install_manifest.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
_cmaker() { | ||
local cur prev words cword | ||
_get_comp_words_by_ref -n : cur prev words cword | ||
|
||
local commands="init run watch add ftp help" | ||
local add_subcommands="dep lib flags" | ||
|
||
case "${prev}" in | ||
add) | ||
COMPREPLY=($(compgen -W "${add_subcommands}" -- "${cur}")) | ||
return 0 | ||
;; | ||
esac | ||
|
||
case "${words[1]}" in | ||
add) | ||
if [ "$cword" -eq 2 ]; then | ||
COMPREPLY=($(compgen -W "${add_subcommands}" -- "${cur}")) | ||
return 0 | ||
fi | ||
;; | ||
*) | ||
if [ "$cword" -eq 1 ]; then | ||
COMPREPLY=($(compgen -W "${commands}" -- "${cur}")) | ||
return 0 | ||
fi | ||
;; | ||
esac | ||
|
||
COMPREPLY=() | ||
} | ||
|
||
complete -F _cmaker cmaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
function __fish_cmaker_needs_command | ||
set -l cmd (commandline -opc) | ||
if test (count $cmd) -eq 1 | ||
return 0 | ||
end | ||
return 1 | ||
end | ||
|
||
function __fish_cmaker_using_command | ||
set -l cmd (commandline -opc) | ||
set -e cmd[1] | ||
if contains -- $argv[1] $cmd | ||
return 0 | ||
end | ||
return 1 | ||
end | ||
|
||
function __fish_cmaker_needs_subcommand | ||
set -l cmd (commandline -opc) | ||
if test (count $cmd) -eq 2 | ||
return 0 | ||
end | ||
return 1 | ||
end | ||
|
||
complete -c cmaker -n '__fish_cmaker_needs_command' -a 'init run watch add ftp help' -f | ||
complete -c cmaker -n '__fish_cmaker_using_command add' -a 'dep lib flags' -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#compdef cmaker | ||
|
||
_cmaker() { | ||
local state | ||
local -a options | ||
local -a cmd | ||
|
||
_arguments -C \ | ||
'1: :->command' \ | ||
'2: :->subcommand' \ | ||
'*::arg:->args' | ||
|
||
options=( | ||
'init:Initializes your project' | ||
'run:Builds and runs your project' | ||
'watch:Watches builds and runs your project on changes' | ||
'add:[dep, lib, flags] Add library, dependecy or flags to your project' | ||
'ftp:Delets the entire project (F*ck this project)' | ||
'help:Print help' | ||
) | ||
|
||
add_options=( | ||
'dep:Add a dependecy <dep>' | ||
'lib:Add a library <lib>' | ||
'flags:Add a flag <flag>' | ||
) | ||
|
||
case $state in | ||
command) | ||
_describe -t commands "command" options | ||
;; | ||
subcommand) | ||
case $words[2] in | ||
add) | ||
_describe -t subcommands "subcommand" add_options | ||
esac | ||
;; | ||
args) | ||
# Leaving empty for now | ||
;; | ||
esac | ||
} | ||
|
||
_cmaker "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.TH "cmaker" "1" "2023-11-05" "cmaker" "cmaker manual" | ||
.SH "NAME" | ||
\fBcmaker - c/cpp package manager\fR | ||
.SH SYNOPSIS | ||
.P | ||
\fBcmaker <sub\-command>\fR | ||
.SH DESCRIPTION | ||
.P | ||
\fBCmaker\fR came to fruition out of the desperate hopes and dreams of a few people looking to softly lighten their suffering while using c++\. | ||
.SH init | ||
.P | ||
Initializes your project\. You'll be prompted with information to enter and cmaker will take care of the rest\. | ||
.br | ||
This will create a cmake file, 1 source file in src directory and config\.toml, where cmaker specific configuration is stored\. | ||
.SS options | ||
.SS \-y | \-\-skip\-init | ||
.P | ||
Skips initialization\. | ||
.SS \-n | \-\-name example\-name | ||
.P | ||
Name of your project | ||
.SS \-l | \-\-language cpp/c | ||
.P | ||
Language of your choice, c or cpp\. | ||
.SH run | ||
.P | ||
Builds and runs your project\. | ||
.SH watch | ||
.P | ||
Same a run command, but also watches file changes and rebuilds your project accordingly\. | ||
.SH add | ||
.P | ||
This command adds a dependency, library or flag to your project\. | ||
.br | ||
\fBSubcommands:\fR | ||
.SS dep | ||
.P | ||
Searches and adds dependency to your project\. | ||
.br | ||
Example: | ||
.RS 2 | ||
.nf | ||
cmaker add dep sdl | ||
.fi | ||
.RE | ||
.P | ||
You'll be shown found results and will be promted to choose from the list\. | ||
.SS lib | ||
.P | ||
Searches and adds library to your project\. | ||
.SS flags | ||
.P | ||
Adds flag to your project\. | ||
.SH ftp | ||
.P | ||
Deletes the entire project :)\. | ||
.br | ||
Why? | ||
.br | ||
Why not? | ||
|
Oops, something went wrong.