Utils
This commit is contained in:
@@ -13,9 +13,9 @@ function option_value() {
|
|||||||
function install() {
|
function install() {
|
||||||
if [ -f ~/.bash_profile ];
|
if [ -f ~/.bash_profile ];
|
||||||
then
|
then
|
||||||
echo -e "${C_LGn}Bash_profile exist${RES}"
|
echo -e "${C_LGn}File bash_profile is exist${RES}"
|
||||||
else
|
else
|
||||||
echo -e "${C_LGn}Make link bash_profile${RES}"
|
echo -e "${C_LGn}Make necessary link to file bash_profile${RES}"
|
||||||
ln -s ~/.profile ~/.bash_profile
|
ln -s ~/.profile ~/.bash_profile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ function install() {
|
|||||||
|
|
||||||
if [ -f ~/.bash_profile ];
|
if [ -f ~/.bash_profile ];
|
||||||
then
|
then
|
||||||
echo -e "${C_LGn}Bash_profile exist${RES}"
|
echo -e "${C_LGn}File bash_profile is exist${RES}"
|
||||||
else
|
else
|
||||||
echo -e "${C_LGn}Make link bash_profile${RES}"
|
echo -e "${C_LGn}Make necessary link to file bash_profile${RES}"
|
||||||
ln -s ~/.profile ~/.bash_profile
|
ln -s ~/.profile ~/.bash_profile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -23,8 +23,10 @@ function install() {
|
|||||||
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
|
||||||
rm -rf `which go | sed 's%/bin/go%%g'`
|
rm -rf `which go | sed 's%/bin/go%%g'`
|
||||||
|
echo -e "${C_LGn}Update & Upgrade your system ...${RES}"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade -y
|
sudo apt upgrade -y
|
||||||
|
echo -e "${C_LGn}installation of necessary components ...${RES}"
|
||||||
sudo apt install tar wget git make -y
|
sudo apt install tar wget git make -y
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
wget -t 5 "https://go.dev/dl/go${go_version}.linux-amd64.tar.gz"
|
wget -t 5 "https://go.dev/dl/go${go_version}.linux-amd64.tar.gz"
|
||||||
|
|||||||
Reference in New Issue
Block a user