1 Star 0 Fork 4

Eric / 字符画转换工具

forked from xuthus / 字符画转换工具 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.sh 925 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuthus 提交于 2018-09-26 13:06 . init repo
#!/bin/bash
Install() {
type lolcat >&/dev/null
lolcat=$?
type figlet >&/dev/null
figlet=$?
if [ $lolcat -eq 0 ] && [ $figlet -eq 0 ]; then
return
fi
echo "----------------------------------"
echo "选择你的包管理工具:"
echo "1) yum"
echo "2) dnf"
echo "3) apt-get"
echo "----------------------------------"
read -p "输入安装版本编号(默认1):" tools
if [ $lolcat -eq 1 ]; then
if [ "${tools}" == "1" ]; then
tools="yum"
elif [ "${tools}" == "1" ]; then
tools="dnf"
else
tools="apt-get"
fi
sudo "${tools}" install ruby
wget https://github.com/busyloop/lolcat/archive/master.zip
unzip master.zip
cd lolcat-master/bin
gem install lolcat
fi
if [ $figlet -eq 1 ]; then
sudo dnf install figlet
fi
}
Print() {
figlet "${1}" | lolcat
}
Install
read -p "输入转换字符串:" string
if [ -z "${string}" ]; then
string="H e l l o !"
fi
Print "${string}"
1
https://gitee.com/zz_Eric/character-banner.git
git@gitee.com:zz_Eric/character-banner.git
zz_Eric
character-banner
字符画转换工具
master

搜索帮助