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 --- init.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'init.sh') diff --git a/init.sh b/init.sh index 331c1ae..30532f9 100755 --- a/init.sh +++ b/init.sh @@ -97,6 +97,7 @@ do printf "\tOK!\n" fi done + # Find libs and create symlinks libfiles=$(ls -1 $(pwd)/lib) for b in $libfiles @@ -118,3 +119,25 @@ do printf "\tOK!\n" fi done +# +# Find modules and create symlinks +modfiles=$(ls -1 $(pwd)/modules) +for m in $modfiles +do + if [ ! -L $AK_MODULESDIR/$m ] + then + printf "Creating symlink to %s..." "$m" + ln -s $(pwd)/modules/$b $AK_MODULESDIR/$m + if [ $? -ne 0 ] + then + if [ -L $AK_MODULESDIR/$m ] + then + printf "\tAlready exists!\n" + exit 1 + fi + printf "\tFailed!\n" + exit 1 + fi + printf "\tOK!\n" + fi +done -- cgit v1.2.3