Compare commits
No commits in common. "main" and "v1.0.4" have entirely different histories.
|
@ -8,5 +8,5 @@
|
||||||
### Linux (binary)
|
### Linux (binary)
|
||||||
```curl -Ls s.tx0.su/ltl | bash```
|
```curl -Ls s.tx0.su/ltl | bash```
|
||||||
|
|
||||||
### Linux/macOS (build from source)
|
### Linux/macOS (biuld from source)
|
||||||
```curl -Ls s.tx0.su/lts | bash```
|
```curl -Ls s.tx0.su/lts | bash```
|
||||||
|
|
|
@ -230,24 +230,7 @@ var deployCmd = &cobra.Command{
|
||||||
for i := 0; i <= 120; i++ {
|
for i := 0; i <= 120; i++ {
|
||||||
if i == 120 {
|
if i == 120 {
|
||||||
ofoxSpinner.Stop()
|
ofoxSpinner.Stop()
|
||||||
logger.Warn("Recovery device timeout")
|
logger.Error("Recovery device timeout")
|
||||||
logger.Info("Trying to restart adb server")
|
|
||||||
err := adbc.KillServer();
|
|
||||||
if err != nil {
|
|
||||||
logger.Error("Failed to kill server")
|
|
||||||
os.Exit(173);
|
|
||||||
}
|
|
||||||
err = adbc.StartServer();
|
|
||||||
if err != nil {
|
|
||||||
logger.Error("Failed to start server")
|
|
||||||
os.Exit(173);
|
|
||||||
}
|
|
||||||
adbd = adbc.Device(adb.DeviceWithSerial(serail));
|
|
||||||
if s, _ := adbd.State(); s == adb.StateRecovery {
|
|
||||||
logger.Info("Device found")
|
|
||||||
break
|
|
||||||
}
|
|
||||||
logger.Error("Device not found")
|
|
||||||
os.Exit(173)
|
os.Exit(173)
|
||||||
}
|
}
|
||||||
if s, _ := adbd.State(); s == adb.StateRecovery {
|
if s, _ := adbd.State(); s == adb.StateRecovery {
|
||||||
|
@ -293,24 +276,7 @@ var deployCmd = &cobra.Command{
|
||||||
for i := 0; i <= 120; i++ {
|
for i := 0; i <= 120; i++ {
|
||||||
if i == 120 {
|
if i == 120 {
|
||||||
ofoxSpinner.Stop()
|
ofoxSpinner.Stop()
|
||||||
logger.Warn("Recovery device timeout")
|
logger.Error("Recovery device timeout")
|
||||||
logger.Info("Trying to restart adb server")
|
|
||||||
err := adbc.KillServer();
|
|
||||||
if err != nil {
|
|
||||||
logger.Error("Failed to kill server")
|
|
||||||
os.Exit(173);
|
|
||||||
}
|
|
||||||
err = adbc.StartServer();
|
|
||||||
if err != nil {
|
|
||||||
logger.Error("Failed to start server")
|
|
||||||
os.Exit(173);
|
|
||||||
}
|
|
||||||
adbd = adbc.Device(adb.DeviceWithSerial(serail));
|
|
||||||
if s, _ := adbd.State(); s == adb.StateRecovery {
|
|
||||||
logger.Info("Device found")
|
|
||||||
break
|
|
||||||
}
|
|
||||||
logger.Error("Device not found")
|
|
||||||
os.Exit(173)
|
os.Exit(173)
|
||||||
}
|
}
|
||||||
if s, _ := adbd.State(); s == adb.StateRecovery {
|
if s, _ := adbd.State(); s == adb.StateRecovery {
|
||||||
|
@ -320,7 +286,6 @@ var deployCmd = &cobra.Command{
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
port, err := utils.GetFreePort()
|
port, err := utils.GetFreePort()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("Failled to find free tcp port")
|
logger.Error("Failled to find free tcp port")
|
||||||
|
|
|
@ -23,6 +23,6 @@ pushd ~/.lon-tool-src &> /dev/null
|
||||||
rev=$(git describe --abbrev=4 --dirty --always --tags)
|
rev=$(git describe --abbrev=4 --dirty --always --tags)
|
||||||
go get git.timoxa0.su/timoxa0/lon-tool/cmd
|
go get git.timoxa0.su/timoxa0/lon-tool/cmd
|
||||||
go build -ldflags "-X git.timoxa0.su/timoxa0/lon-tool/cmd.version=$rev" -o "$HOME/.local/bin/lon-tool" main.go && {
|
go build -ldflags "-X git.timoxa0.su/timoxa0/lon-tool/cmd.version=$rev" -o "$HOME/.local/bin/lon-tool" main.go && {
|
||||||
printf "\e[32mDone!\e[0m Installed at %s\n" "$HOME/.local/bin/lon-tool"
|
printf "\e[32mDone!\e[0m Installed at %s\n" "$HOME/go/bin/lon-tool"
|
||||||
}
|
}
|
||||||
popd &> /dev/null
|
popd &> /dev/null
|
||||||
|
|
|
@ -6,7 +6,7 @@ URL="https://git.timoxa0.su/timoxa0/lon-tool/releases/download/latest/lon-tool_l
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -d "$HOME/.local/bin" ] || {
|
[ -d "$HOME/.local/bin" ] && {
|
||||||
mkdir --parent "$HOME/.local/bin"
|
mkdir --parent "$HOME/.local/bin"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue