Skip to content

Commit 9a7a8d3

Browse files
committed
bugfix
1 parent 1c866ad commit 9a7a8d3

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.tar.gz
2+
install.sh

Taskfile.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,26 @@ echo 'run command: tar -zxvf ./mdtk_bin_VERSION.tar.gz'
2626
~~~
2727

2828
## Install Guide
29-
[!] Cannot install mdtk using mdtk.
3029

3130
~~~bash task:install-guide:linux-amd64 -- Display command (amd64 arch)
3231
echo 'run command: sudo cp ./sources/mdtk_bin/linux_amd64/mdtk /usr/local/bin/mdtk'
32+
echo 'create script'
33+
filename=install.sh
34+
mdtk _install install-linux --all-task --script -- arch=amd64 > $filename
35+
sudo chmod +x $filename
3336
~~~
3437
~~~bash task:install-guide:linux-arm64 -- Display command (arm64 arch)
3538
echo 'run command: sudo cp ./sources/mdtk_bin/linux_arm64/mdtk /usr/local/bin/mdtk'
39+
echo 'create script'
40+
filename=install.sh
41+
mdtk _install install-linux --all-task --script -- arch=arm64 > $filename
42+
sudo chmod +x $filename
43+
~~~
44+
45+
~~~bash task:_install:install-linux
46+
#args> arch=(amd64|arm64)
47+
echo "Install mdtk (os: linux, arch: $arch)"
48+
sudo cp ./sources/mdtk_bin/linux_$arch/mdtk /usr/local/bin/mdtk
3649
~~~
3750

3851
## Utils

sources/Taskfile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo "Hello $THIS World!"
1818
echo hello mdtk! pwd:`pwd`
1919
```
2020

21-
```task::test2 mdtk test
21+
```task::test2
2222
#config> once
2323
echo "hello mdtk! (config once)"
2424
```

sources/mdtk/help/help_private.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ func getEmbedDescTexts(tds taskset.TaskDataSet) taskset.TaskDataSet {
3232
for i, task := range tds.Data {
3333
desc := task.Code.GetEmbedDescText()
3434
if len(tds.Data[i].Description) == 1 && tds.Data[i].Description[0] == "" {
35-
tds.Data[i].Description = desc
35+
if len(desc) != 0 {
36+
tds.Data[i].Description = desc
37+
} else {
38+
tds.Data[i].Description = []string{"----"}
39+
}
3640
} else {
3741
tds.Data[i].Description = append(tds.Data[i].Description, desc...)
3842
}

sources/mdtk_bin/linux_amd64/mdtk

0 Bytes
Binary file not shown.

sources/mdtk_bin/linux_arm64/mdtk

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)