Utils
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
if [ -f ~/.bash_profile ];
|
|
||||||
then
|
|
||||||
echo "bash_profile exist"
|
|
||||||
else
|
|
||||||
echo "make link bash_profile"
|
|
||||||
ln -s ~/.profile ~/.bash_profile
|
|
||||||
fi
|
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
action="install"
|
action="install"
|
||||||
go_version="1.18.1"
|
go_version="1.18.1"
|
||||||
|
|
||||||
#. <(wget -qO- https://raw.githubusercontent.com/letsnode/Utils/main/bashbuilder/colors.sh) --
|
|
||||||
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/bashbuilder/colors.sh) --
|
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/bashbuilder/colors.sh) --
|
||||||
|
|
||||||
function option_value() {
|
function option_value() {
|
||||||
@@ -11,6 +10,15 @@ function option_value() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install() {
|
function install() {
|
||||||
|
|
||||||
|
if [ -f ~/.bash_profile ];
|
||||||
|
then
|
||||||
|
echo -e "${C_LGn}Bash_profile exist${RES}"
|
||||||
|
else
|
||||||
|
echo -e "${C_LGn}Make link bash_profile${RES}"
|
||||||
|
ln -s ~/.profile ~/.bash_profile
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "${C_LGn}GO installation...${RES}"
|
echo -e "${C_LGn}GO installation...${RES}"
|
||||||
if ! go version | grep -q $go_version; then
|
if ! go version | grep -q $go_version; then
|
||||||
sed -i "s%:`which go | sed 's%/bin/go%%g'`%%g" $HOME/.bash_profile
|
sed -i "s%:`which go | sed 's%/bin/go%%g'`%%g" $HOME/.bash_profile
|
||||||
|
|||||||
Reference in New Issue
Block a user