aboutsummaryrefslogtreecommitdiff
path: root/update.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 /update.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 'update.sh')
-rwxr-xr-xupdate.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/update.sh b/update.sh
index bfa66f2..cd2aeaf 100755
--- a/update.sh
+++ b/update.sh
@@ -1,5 +1,6 @@
#!/bin/bash
+# Updates bin files
find $AK_BINDIR -type l | while read link
do
if [ ! -f $link ]
@@ -9,9 +10,25 @@ do
fi
done
-# Find scripts and create symlinks
binfiles=$(ls -1 $(pwd)/bin)
for b in $binfiles
do
if [ ! -L $AK_BINDIR/$b ] ; then ln -s $(pwd)/bin/$b $AK_BINDIR/$b ;fi
done
+
+# Updates lib files
+find $AK_LIBDIR -type l | while read link
+do
+ if [ ! -f $link ]
+ then
+ echo "Non working link: $(basename $link) removing..."
+ rm $link
+ fi
+done
+
+# Find scripts and create symlinks
+libfiles=$(ls -1 $(pwd)/lib)
+for l in $libfiles
+do
+ if [ ! -L $AK_LIBDIR/$l ] ; then ln -s $(pwd)/lib/$l $AK_LIBDIR/$l ;fi
+done