From bf87d94330c6c6153eab9f1a3016efeef5ebc754 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 11 Mar 2024 19:36:28 +0200 Subject: Introduced ./lib for common stuff ofc, logit was the first lib to add... finally --- init.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'init.sh') diff --git a/init.sh b/init.sh index d278039..c4c92c0 100755 --- a/init.sh +++ b/init.sh @@ -86,7 +86,7 @@ do then printf "Creating symlink to %s..." "$b" ln -s $(pwd)/bin/$b $AK_BINDIR/$b - if [ "$?" -ne "0" ] + if [ $? -ne 0 ] then if [ -L $AK_BINDIR/$b ] then @@ -99,3 +99,24 @@ do printf "\tOK!\n" fi done +# Find libs and create symlinks +libfiles=$(ls -1 $(pwd)/lib) +for b in $libfiles +do + if [ ! -L $AK_LIBDIR/$b ] + then + printf "Creating symlink to %s..." "$b" + ln -s $(pwd)/lib/$b $AK_LIBDIR/$b + if [ $? -ne 0 ] + then + if [ -L $AK_LIBDIR/$b ] + then + printf "\tAlready exists!\n" + exit 1 + fi + printf "\tFailed!\n" + exit 1 + fi + printf "\tOK!\n" + fi +done -- cgit v1.2.3