aboutsummaryrefslogtreecommitdiff
path: root/init.sh
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-11 19:36:28 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-03-11 19:36:28 +0200
commitbf87d94330c6c6153eab9f1a3016efeef5ebc754 (patch)
tree99ca0366d4d956848d8793130734e5761794dade /init.sh
parentd4e498a18f700e288764cdf8799a2b07a76e1615 (diff)
downloadarching-kaos-tools-bf87d94330c6c6153eab9f1a3016efeef5ebc754.tar.gz
arching-kaos-tools-bf87d94330c6c6153eab9f1a3016efeef5ebc754.tar.bz2
arching-kaos-tools-bf87d94330c6c6153eab9f1a3016efeef5ebc754.zip
Introduced ./lib for common stuff
ofc, logit was the first lib to add... finally
Diffstat (limited to 'init.sh')
-rwxr-xr-xinit.sh23
1 files changed, 22 insertions, 1 deletions
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