1.7.4e code cleanup

This commit is contained in:
Dewalt 2023-08-05 06:48:57 -05:00
parent 1ed8ed51f1
commit cc30cd78bd
1 changed files with 4 additions and 2 deletions

View File

@ -398,11 +398,11 @@ fix_cme() {
getshell=$(echo $SHELL | cut -d "/" -f4) getshell=$(echo $SHELL | cut -d "/" -f4)
check_for_local_bin_path=$(cat "$HOME/.$getshell"rc | grep -i "PATH=" | grep -i "\$HOME\/\.local\/bin" -c) check_for_local_bin_path=$(cat "$HOME/.$getshell"rc | grep -i "PATH=" | grep -i "\$HOME\/\.local\/bin" -c)
if [[ $check_for_local_bin_path == 0 ]]; if [[ $check_for_local_bin_path -eq 0 ]];
then then
echo "export PATH=$PATH:$HOME/.local/bin" >> $HOME/.$getshell"rc" echo "export PATH=$PATH:$HOME/.local/bin" >> $HOME/.$getshell"rc"
else else
echo "Path is already set in $HOME/.$getshell"rc echo "\n $redexclaim Path is already exists for user $findrealuser "
fi fi
fix_cme_symlinks fix_cme_symlinks
fi fi
@ -425,6 +425,8 @@ fix_cme() {
then then
runuser $findrealuser $getshell -c 'subshell=$(echo $SHELL | cut -d "/" -f4); echo "export PATH=\$PATH:\$HOME/.local/bin" >> $HOME/.$subshell"rc"' runuser $findrealuser $getshell -c 'subshell=$(echo $SHELL | cut -d "/" -f4); echo "export PATH=\$PATH:\$HOME/.local/bin" >> $HOME/.$subshell"rc"'
runuser $findrealuser $getshell -c 'subshell=$(echo $SHELL | cut -d "/" -f4); source $HOME/.$subshell"rc"' runuser $findrealuser $getshell -c 'subshell=$(echo $SHELL | cut -d "/" -f4); source $HOME/.$subshell"rc"'
else
echo -e "\n $redexclaim Path already exists "
fi fi
fix_cme_symlinks fix_cme_symlinks
fi fi