first
This commit is contained in:
commit
b50fd16591
197 changed files with 41663 additions and 0 deletions
50
overlay/Linux/usr/local/src/usr_local_base.bash
Executable file
50
overlay/Linux/usr/local/src/usr_local_base.bash
Executable file
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
# -*-mode: sh; tab-width: 8; coding: utf-8-unix -*-
|
||||
|
||||
ROLE=proxy
|
||||
PREFIX=/usr/local
|
||||
|
||||
# should be usable per user
|
||||
. /usr/local/src/usr_local_src.bash || exit 2
|
||||
ols_check_site_py >/dev/null || exit 3$?
|
||||
|
||||
DESC=""
|
||||
export LOG_DIR=$PREFIX/var/log/$ROLE
|
||||
|
||||
if [ "$#" -eq 0 ] ; then
|
||||
|
||||
cd $HOME || exit 1
|
||||
[ -d .local ] || mkdir .local
|
||||
cd .local || exit 2
|
||||
|
||||
[ -e bin ] || ln -s /usr/local/bin bin || exit 3
|
||||
|
||||
# ls lib* 2>/dev/null >/dev/null && find -L lib* -type l -delete 2>/dev/null
|
||||
# lib64 should be the symlink
|
||||
if [ ! -e lib ] && [ ! -e lib64 ] ; then
|
||||
( mkdir lib && ln -s lib lib64 ) || { echo ERROR: 4 in $PWD ; exit 4 ; }
|
||||
elif [ -e lib ] && [ ! -e lib64 ] ;then
|
||||
# lib64 should be the symlink
|
||||
ln -s lib lib64 || { echo ERROR: 5 in $PWD ; exit 5 ; }
|
||||
elif [ -e lib64 ] && [ ! -e lib ] ; then
|
||||
ln -s lib64 lib || { echo ERROR: 6 in $PWD ; exit 6 ; }
|
||||
elif [ -d lib ] && [ -e lib64 ] ;then
|
||||
# echo DEBUG: good
|
||||
: pass
|
||||
else
|
||||
echo WARN: $0 FixMe - both lib and lib64 in $PWD
|
||||
fi
|
||||
|
||||
cd lib64 || exit 7
|
||||
for elt in $BASE_PYTHON2_MINOR $BASE_PYTHON3_MINOR ; do
|
||||
# delete dangling bad symlinks
|
||||
[ -h python$elt ] && [ ! -e python$elt ] && rm python$elt
|
||||
[ -e python$elt ] || ln -s /usr/local/$LIB/python$elt python$elt \
|
||||
|| { echo ERROR: 8 in $PWD ; exit 8 ; }
|
||||
done
|
||||
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue