diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-03-11 19:36:28 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-03-11 19:36:28 +0200 |
commit | bf87d94330c6c6153eab9f1a3016efeef5ebc754 (patch) | |
tree | 99ca0366d4d956848d8793130734e5761794dade /update.sh | |
parent | d4e498a18f700e288764cdf8799a2b07a76e1615 (diff) | |
download | arching-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-x | update.sh | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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 |