Skip to content

Commit

Permalink
SERF(stable)
Browse files Browse the repository at this point in the history
  • Loading branch information
Solaris committed Apr 19, 2020
1 parent 55ef4de commit e65ef51
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
49 changes: 46 additions & 3 deletions pipe
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@


#路径变量设定
export PM="apt"
export ver="3.0.2"
export ver="3.1.2"
export mirrors="$PREFIX/etc/apt/sources.list"
export output="/dev/null"

Expand All @@ -27,6 +26,8 @@ export search="apt search"
export list="apt list"




#字符变量
export EI1="│X│"
export EI2="\033[41;37m X \033[0m"
Expand All @@ -37,6 +38,46 @@ export LI="↻"
export CI=""


#包管理器名称
case $install in
"apk add")
export PM="apk"
;;
"pip install")
export PM="pip"
;;
"pacman -S")
export PM="pacman"
;;
"brew install")
export PM="brew"
;;
"pkg install")
export PM="apt"
;;
"apt install")
export PM="apt"
;;
"apt-get install")
export PM="apt"
;;
"dpkg -i")
export PM="dpkg"
;;
"dnf install")
export PM="redhat"
;;
"yum install")
export PM="redhat"
;;
"rpm -i")
export PM="synaptic"
;;
"*")
export PM="___"
esac


#progress函数
function progress {
b=''
Expand Down Expand Up @@ -64,6 +105,8 @@ function about {
echo "尝试终端运行pipe h来获取更多"
}
about #于下方可直接引用此函数


#安装
elif [ $1 == d ]; then
if [ x"$2" = x ]; then
Expand Down Expand Up @@ -148,7 +191,7 @@ function usage {
echo "PickPipe ver$ver for termux"
echo "Usage:pipe [命令] [参数]"
echo ""
echo "PickPipe意在将臃肿的$PM包管理器进行简化"
echo "PickPipe意在将当前的$PM包管理器进行简化"
echo ""
echo "命令:"
echo "d 安装软件包"
Expand Down
2 changes: 1 addition & 1 deletion update.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
var=3.0.2
var=3.1.2
echo "当前最新版本:$var"
if [ "$ver" == "$var" ]; then
echo -e "\033[32m 当前为最新版本 \033[0m"
Expand Down

0 comments on commit e65ef51

Please sign in to comment.