From 0d1777251dea7d35cd774518959b4377673e1cab Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 4 Jun 2024 18:07:39 +0300 Subject: Refactoring, modules directory introduced - All modules are now stored separately from the rest of the bin/ - You can run them now with `ak -m ` - Files affected: * bin/ak-articles -> modules/ak-articles * bin/ak-categories -> modules/ak-categories * bin/ak-comments -> modules/ak-comments * bin/ak-files -> modules/ak-files * bin/ak-folders -> modules/ak-folders * bin/ak-mixtapes -> modules/ak-mixtapes * bin/ak-news -> modules/ak-news * bin/ak-reference -> modules/ak-reference * bin/ak-repositories -> modules/ak-repositories * bin/ak-roadmap -> modules/ak-roadmap * bin/ak-todos -> modules/ak-todos --- bin/ak | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'bin/ak') diff --git a/bin/ak b/bin/ak index c64ee44..a1bc85f 100755 --- a/bin/ak +++ b/bin/ak @@ -52,14 +52,16 @@ fi subcmd="$(echo $* | sed -e 's/ /-/g')" # Add functionality for separate modules directory -# case "$1" in -# -m|--module) -# shift -# subcmd="modules/$(echo $* | sed -e 's/ /-/g')" -# ;; -# esac -# -# echo $subcmd +case "$1" in + -m|--module) + shift + subcmd="$AK_MODULESDIR/$(echo $1 | sed -e 's/ /-/g')" + shift + subargs="$*" + $subcmd $subargs + _ak_exit_program $? "$subcmd module finished"; + ;; +esac if [ -f "$AK_BINDIR/ak-$subcmd" ] then -- cgit v1.2.3