Update Tue Aug 24 04:02:19 AM CDT 2021

This commit is contained in:
Dewalt 2021-08-24 04:02:19 -05:00
parent 56b27da02e
commit 2b4c3b84e5
1 changed files with 5 additions and 3 deletions

View File

@ -514,9 +514,10 @@ fix_go_path() {
if [ $findrealuser == "root" ]
then
check_root_zshrc=$(cat /root/.zshrc | grep -c GOPATH)
[ -d /$findrealuser/go ] && echo -e "\n $greenminus go directories already exist in /$findrealuser" || echo -e "\n $greenplus creating directories /$findrealuser/go /$findrealuser/go/bin /$findrealuser/go/src"; mkdir -p /$findrealuser/go/{bin,src}
if [ $check_root_zshrc -ne 0 ]
then
echo -e "\n $redminus GOPATH Variables for $findrealuser already exist in /root/.zshrc - Not changing"
echo -e "\n $redminus GOPATH Variables for $findrealuser already exist in /$findrealuser/.zshrc - Not changing"
else
echo -e "\n $greenplus Adding GOPATH Variables to /root/.zshrc"
eval echo -e 'export GOPATH=\$HOME/go' >> /root/.zshrc
@ -525,7 +526,7 @@ fix_go_path() {
check_root_bashrc=$(cat /root/.bashrc | grep -c GOPATH)
if [ $check_root_bashrc -ne 0 ]
then
echo -e "\n $redminus GOPATH Variables for $findrealuser already exist in /root/.bashrc - Not changing"
echo -e "\n $redminus GOPATH Variables for $findrealuser already exist in /$findrealuser/.bashrc - Not changing"
else
echo -e "\n $greenplus Adding GOPATH Variables to /root/.bashrc"
eval echo -e 'export GOPATH=\$HOME/go' >> /root/.bashrc
@ -533,6 +534,7 @@ fix_go_path() {
fi
else
check_user_zshrc=$(cat /home/$findrealuser/.zshrc | grep -c GOPATH)
[ -d /home/$findrealuser/go ] && echo -e "\n $greenminus go directories already exist in /home/$finduser" || echo -e "\n creating directories /home/$findrealuser/go /home/$findrealuser/go/bin /home/$findrealuser/go/src"; mkdir -p /home/$findrealuser/go/{bin,src}
if [ $check_user_zshrc -ne 0 ]
then
echo -e "\n $redminus GOPATH Variables for user $findrealuser already exist in /home/$findrealuser/.zshrc - Not Changing"