added custom ascii support
This commit is contained in:
parent
9e36993b9f
commit
99a6d51717
2 changed files with 18 additions and 10 deletions
|
|
@ -3,6 +3,7 @@ package utils
|
|||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
|
@ -58,6 +59,12 @@ func Initcolor() {
|
|||
func CutePrintInit() {
|
||||
dist := data.GetDistroVariable("ID")
|
||||
logo := Getascii(dist)
|
||||
|
||||
if Customascii {
|
||||
body, _ := ioutil.ReadFile(asciidir)
|
||||
logo = (string(body))
|
||||
}
|
||||
|
||||
if noascii {
|
||||
logo = ""
|
||||
}
|
||||
|
|
@ -70,7 +77,7 @@ func CutePrintInit() {
|
|||
for _, v := range logoLines {
|
||||
lineLength := len([]rune(v))
|
||||
if lineLength > logoWidth {
|
||||
logoWidth = lineLength
|
||||
logoWidth = lineLength + 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue