Skip to content

Commit aad0c6d

Browse files
committed
shell scripts updated
1 parent a47a3ee commit aad0c6d

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

godemon-installer.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh
22

3+
#latest release url - https://github.com/nProgrammer/godemon/releases/latest/download/...
4+
35
buildApp() {
46
unzip 21.03.zip
57
cd ./godemon-21.03
@@ -10,6 +12,8 @@ prepareDirs() {
1012
mkdir ~/.godemon
1113
mkdir ~/.godemon/logs/
1214
mkdir ~/.godemon/bin/
15+
sudo chmod 777 .godemon-installer
16+
mv ./godemon-installer ~/.godemon/bin
1317
}
1418

1519
removing() {
@@ -66,14 +70,14 @@ then
6670
fi
6771
fi
6872

69-
printf "\n Everything done \n"
73+
printf "\nEverything done \n"
7074
if [ "$OPTION" = "1" ]
7175
then
7276
if [ "$GL" = "2" ]
7377
then
74-
printf "\nNow add to .bashrc following line: export PATH=\$PATH:~/.godemon/bin"
78+
printf "\nNow add to .bashrc or .zshenv following line: export PATH=\$PATH:~/.godemon/bin \n"
7579
elif [ "$GL" = "1" ]
7680
then
77-
printf "\nNow add to .bashrc following line: export PATH=\$PATH:/usr/local/.godemon/bin \nIf it's MacOS - add this line to .zshenv"
81+
printf "\nNow add to .bashrc following line: export PATH=\$PATH:/usr/local/.godemon/bin \nIf it's MacOS - add this line to .zshenv and export PATH=\$PATH:~/.godemon/bin \n"
7882
fi
7983
fi

godemon-update

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/sh
2+
3+
buildApp() {
4+
unzip $VERSION.zip
5+
cd ./godemon-$VERSION
6+
go build
7+
}
8+
9+
prepareDirs() {
10+
mkdir ~/.godemon
11+
mkdir ~/.godemon/logs/
12+
mkdir ~/.godemon/bin/
13+
}
14+
15+
removing() {
16+
cd ..
17+
sudo rm -r godemon-$VERSION
18+
sudo rm -r $VERSION.zip
19+
}
20+
21+
printf "**********_________________***********\n*********/*****************\**********\n********/*******************\*********\n*******/_____________________\********\n*********WELCOME TO GODEMON***********\n*************UPDATE****************\n\n"
22+
23+
printf "\nWhat version do you want to install: "
24+
read VERSION
25+
printf "\nDo you want to do this: \n1. Global \n2. Local \n"
26+
printf "\nAnswer: "
27+
read GL
28+
29+
wget https://github.com/nProgrammer/godemon/archive/$VERSION.zip
30+
31+
if [ "$GL" = "2" ]
32+
then
33+
buildApp
34+
prepareDirs
35+
sudo mv godemon ~/.godemon/bin/
36+
sudo chmod 777 ~/.godemon/bin/godemon
37+
removing
38+
elif [ "$GL" = "1" ]
39+
then
40+
buildApp
41+
prepareDirs
42+
sudo mkdir /usr/local/.godemon/bin/
43+
sudo mv godemon /usr/local/.godemon/bin/
44+
sudo chmod 777 /usr/local/.godemon/bin/godemon
45+
removing
46+
fi
47+
48+
printf "\nEverything done \n"

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
func main() {
2626
hostInfo := [2]string{build.Default.GOOS, build.Default.GOARCH}
2727
color.Cyan("Godemon starting...")
28-
version := "21.04"
28+
version := "21.04 LTS"
2929
color.HiMagenta("Welcome to godemon " + version)
3030
doneChan := make(chan bool)
3131
filepath, modOrFile, cnf, command, help, init, name, oso, arch, cont := cliTools.LoadCMD("", "")

0 commit comments

Comments
 (0)