Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Oct 17, 2019
1 parent cb16add commit db7de80
Show file tree
Hide file tree
Showing 25 changed files with 1,425 additions and 1,019 deletions.
77 changes: 55 additions & 22 deletions GNUstep/setup-on-gnu-linux.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,68 @@
#!/bin/bash
#!/bin/sh

[ `whoami` == "root" ] || role=sudo
[ "$(whoami)" = "root" ] || sudo=sudo

Color_Purple='\033[0;35m' # Purple
Color_Off='\033[0m' # Reset

msg() {
printf "%b\n" "$1"
}

info() {
msg "${Color_Purple}[❉]${Color_Off} $1$2"
}

# GNUstep的v1版(不支持Objectie-C 2.0)
function installViaApt() {
$role apt-get -y update && \
$role apt-get -y install make gobjc gnustep gnustep-devel && \
$role bash /usr/share/GNUstep/Makefiles/GNUstep.sh
installViaApt() {
$sudo apt-get -y update &&
$sudo apt-get -y install bash make gobjc gnustep gnustep-devel &&
$sudo sh /usr/share/GNUstep/Makefiles/GNUstep.sh
}

URL=http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-startup-0.32.0.tar.gz
FILENAME=$(basename "$URL")

downloadIfNeed() {
[ -f "$FILENAME" ] && tar -tf "$FILENAME" > /dev/null 2>&1 && return 0
info "Downloading $URL"
curl -C - -LO "$URL"
}

setEnv() {
str=". /usr/GNUstep/System/Library/Makefiles/GNUstep.sh"
[ -f "$1" ] && grep "$str" "$1" || return 0
printf "%s\n" "$str" "$1"
}

# GNUstep的v1版(不支持Objectie-C 2.0)
function installViaYum() {
$role yum -y update && \
$role yum -y install make gcc gcc-objc libobjc libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libxml2 libxml2-devel libX11-devel libXt-devel libxslt libxslt-devel libicu libicu-devel gnutls gnutls-devel
curl -C - -L -O http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-startup-0.32.0.tar.gz && \
tar zvxf gnustep-startup-0.32.0.tar.gz && \
cd gnustep-startup-0.32.0 && \
./configure && \
echo -e "\n" | make && \
$role bash /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
installViaYum() {
$sudo yum -y update &&
$sudo yum -y install bash which make gcc gcc-objc libobjc libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libxml2 libxml2-devel libX11-devel libXt-devel libxslt libxslt-devel libicu libicu-devel gnutls gnutls-devel libffi-devel
downloadIfNeed &&
tar zvxf "$FILENAME" &&
cd "$(basename "$FILENAME" .tar.gz)" &&
info "Installing ..." &&
./configure &&
printf "\n\n" | make &&
$sudo sh /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
setEnv "$HOME/.bashrc"
setEnv "$HOME/.zshrc"
}

function main() {
[ "`uname -s`" == "Darwin" ] && {
echo "your os is Darwin, not GNU/Linux";
exit 1
main() {
command -v apt-get > /dev/null && {
installViaApt
exit
}

command -v apt-get &> /dev/null && (installViaApt; exit)

command -v yum &> /dev/null && (installViaYum; exit)
command -v yum > /dev/null && {
installViaYum
exit
}

info "not support your os.";
exit 1
}

main
134 changes: 52 additions & 82 deletions OpenSSL/build-for-android.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Cross-compile environment for Android on ARMv7 and x86
#
Expand All @@ -10,8 +10,11 @@

########################### 修改下面的变量 #############################

# 设置NDK的安装路径
ANDROID_NDK_ROOT=/usr/local/share/android-ndk
if [ -z "$ANDROID_NDK_HOME" ] ; then
ANDROID_NDK_ROOT=/usr/local/share/android-ndk
else
ANDROID_NDK_ROOT=$ANDROID_NDK_HOME
fi

# 设置工具链的名字。$ANDROID_NDK_ROOT/toolchains目录中那些文件夹名称
_ANDROID_EABI="arm-linux-androideabi-4.9"
Expand All @@ -24,73 +27,42 @@ _ANDROID_API="android-23"

#####################################################################

if [ -z "$ANDROID_NDK_ROOT" ] ; then
echo "Error: please set ANDROID_NDK_ROOT";
exit 1;
fi
Color_Red='\033[0;31m' # Red
Color_Purple='\033[0;35m' # Purple
Color_Off='\033[0m' # Reset

if [ -d "$ANDROID_NDK_ROOT" ] ; then
export ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT"
else
echo "Error: $ANDROID_NDK_ROOT is not a valid path!"
exit 1;
fi
msg() {
printf "%b\n" "$1"
}

info() {
msg "${Color_Purple}[❉]${Color_Off} $1$2"
}

if [ ! -d "$ANDROID_NDK_ROOT/toolchains" ] ; then
echo "Error: $ANDROID_NDK_ROOT/toolchains is not a valid path!"
error() {
msg "${Color_Red}[✘]${Color_Off} $1$2"
exit 1
fi
}

if [ ! -d "$ANDROID_NDK_ROOT/toolchains/$_ANDROID_EABI" ] ; then
echo "Error: $ANDROID_NDK_ROOT/toolchains/$_ANDROID_EABI is not a valid path!"
exit 1;
fi
[ -z "$ANDROID_NDK_ROOT" ] && error "please set ANDROID_NDK_ROOT"

#####################################################################
[ -d "$ANDROID_NDK_ROOT" ] || error "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT is not a valid path!"

export ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT"

# Based on ANDROID_NDK_ROOT, try and pick up the required toolchain. We expect something like:
# /opt/android-ndk-r83/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin
# Once we locate the toolchain, we add it to the PATH. Note: this is the 'hard way' of
# doing things according to the NDK documentation for Ice Cream Sandwich.
# https://android.googlesource.com/platform/ndk/+/ics-mr0/docs/STANDALONE-TOOLCHAIN.html
[ -d "$ANDROID_NDK_ROOT/toolchains" ] || error "$ANDROID_NDK_ROOT/toolchains is not a valid path!"

ANDROID_TOOLCHAIN=""
for host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86"
do
dir="$ANDROID_NDK_ROOT/toolchains/$_ANDROID_EABI/prebuilt/$host/bin"
if [ -d $dir ]; then
ANDROID_TOOLCHAIN=$dir;
break;
fi
done
[ -d "$ANDROID_NDK_ROOT/toolchains/$_ANDROID_EABI" ] || error "$ANDROID_NDK_ROOT/toolchains/$_ANDROID_EABI is not a valid path!"

if [ -z "$ANDROID_TOOLCHAIN" ] || [ ! -d "$ANDROID_TOOLCHAIN" ]; then
echo "Error: ANDROID_TOOLCHAIN is not valid. Please edit this script."
exit 1
fi
HOST=$(uname -s)-$(uname -m)

if [ $_ANDROID_ARCH == "arch-arm" ] ; then
ANDROID_TOOLS="arm-linux-androideabi-gcc arm-linux-androideabi-ranlib arm-linux-androideabi-ld"
elif [ $_ANDROID_ARCH == "arch-x86" ] ; then
ANDROID_TOOLS="i686-linux-android-gcc i686-linux-android-ranlib i686-linux-android-ld"
else
echo "$_ANDROID_ARCH is not support!"
exit 1;
fi
ANDROID_TOOLCHAIN="$ANDROID_NDK_ROOT/toolchains/$_ANDROID_EABI/prebuilt/$HOST/bin"

for tool in $ANDROID_TOOLS
do
toolPath="$ANDROID_TOOLCHAIN/$tool"
if [ ! -e $toolPath ]; then
echo "Error: $toolPath is not exsit. Please edit this script."
exit 1
fi
done
[ -z "$ANDROID_TOOLCHAIN" ] && error "NDK may be not installed"
[ -d "$ANDROID_TOOLCHAIN" ] || error "ANDROID_TOOLCHAIN=$ANDROID_TOOLCHAIN is not directory. Please edit this script."

if [ ! -z "$ANDROID_TOOLCHAIN" ]; then
export ANDROID_TOOLCHAIN="$ANDROID_TOOLCHAIN"
export PATH="$ANDROID_TOOLCHAIN":"$PATH"
fi
export ANDROID_TOOLCHAIN="$ANDROID_TOOLCHAIN"
export PATH="$ANDROID_TOOLCHAIN":"$PATH"

#####################################################################

Expand All @@ -101,27 +73,23 @@ export CROSS_SYSROOT="$ANDROID_SYSROOT"
export NDK_SYSROOT="$ANDROID_SYSROOT"
export C_INCLUDE_PATH="$ANDROID_NDK_ROOT/sysroot/usr/include":"$ANDROID_NDK_ROOT/sysroot/usr/include/arm-linux-androideabi":"$ANDROID_NDK_ROOT/sysroot/usr/include/i686-linux-android"



if [ -z "$ANDROID_SYSROOT" ] || [ ! -d "$ANDROID_SYSROOT" ]; then
echo "Error: $ANDROID_SYSROOT is not valid. Please edit this script."
exit 1
fi
[ -z "$ANDROID_SYSROOT" ] && error "ANDROID_SYSROOT is empty."
[ -d "$ANDROID_SYSROOT" ] || error "ANDROID_SYSROOT=$ANDROID_SYSROOT is not directory. Please edit this script."

#####################################################################

if [ -z "$FIPS_SIG" ] || [ ! -e "$FIPS_SIG" ]; then
_FIPS_SIG=""
if [ -d "/usr/local/ssl/$_ANDROID_API" ]; then
_FIPS_SIG=`find "/usr/local/ssl/$_ANDROID_API" -name incore`
_FIPS_SIG=$(find "/usr/local/ssl/$_ANDROID_API" -name incore)
fi

if [ ! -e "$_FIPS_SIG" ]; then
#在当前目录的util/incore
_FIPS_SIG=`find $PWD -name incore`
_FIPS_SIG=$(find "$PWD" -name incore)
fi

if [ ! -z "$_FIPS_SIG" ] && [ -e "$_FIPS_SIG" ]; then
if [ -n "$_FIPS_SIG" ] && [ -e "$_FIPS_SIG" ]; then
export FIPS_SIG="$_FIPS_SIG"
fi
fi
Expand All @@ -136,7 +104,7 @@ fi
export RELEASE=2.6.37
export SYSTEM=android

if [ "$_ANDROID_ARCH" == "arch-x86" ] ; then
if [ "$_ANDROID_ARCH" = "arch-x86" ] ; then
export MACHINE=i686
export ARCH=x86
export CROSS_COMPILE="i686-linux-android-"
Expand All @@ -155,21 +123,23 @@ export ANDROID_API="$_ANDROID_API"
export ANDROID_DEV="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH/usr"
export HOSTCC=gcc

echo "------------------------------------------"
echo "ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT"
echo "ANDROID_ARCH: $_ANDROID_ARCH"
echo "ANDROID_EABI: $_ANDROID_EABI"
echo "ANDROID_API: $ANDROID_API"
echo "ANDROID_SYSROOT: $ANDROID_SYSROOT"
echo "ANDROID_TOOLCHAIN: $ANDROID_TOOLCHAIN"
echo "FIPS_SIG: $FIPS_SIG"
echo "CROSS_COMPILE: $CROSS_COMPILE"
echo "ANDROID_DEV: $ANDROID_DEV"
echo "------------------------------------------"
echo "build begain..."
cat << EOF
------------------------------------------
ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT
ANDROID_ARCH: $_ANDROID_ARCH
ANDROID_EABI: $_ANDROID_EABI
ANDROID_API: $ANDROID_API
ANDROID_SYSROOT: $ANDROID_SYSROOT
ANDROID_TOOLCHAIN: $ANDROID_TOOLCHAIN
FIPS_SIG: $FIPS_SIG
CROSS_COMPILE: $CROSS_COMPILE
ANDROID_DEV: $ANDROID_DEV
------------------------------------------"
build begain...
EOF

# 清除上次构建残留的信息
make clean >& /dev/null
make clean > /dev/null 2>&1
# 替换文件中的内容
perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.shared

Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
|OpenArkCompiler|[Dockerfile](https://github.com/leleliu008/auto/blob/master/OpenArkCompiler/Dockerfile)|[华为方舟编译器](http://blog.fpliu.com/it/software/华为方舟编译器)[Docker](http://blog.fpliu.com/it/software/Docker)镜像构建脚本|
|redex|[Dockerfile](https://github.com/leleliu008/auto/blob/master/redex/Dockerfile)|[ReDex](http://blog.fpliu.com/it/software/ReDex)[Docker](http://blog.fpliu.com/it/software/Docker)镜像构建脚本|
|android-sdk|[Dockerfile](https://github.com/leleliu008/auto/blob/master/android-sdk/Dockerfile)|[AndroidSDK](http://blog.fpliu.com/it/software/AndroidSDK)[Docker](http://blog.fpliu.com/it/software/Docker)镜像构建脚本|
|android-sdk|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/android-sdk/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[AndroidSDK](http://blog.fpliu.com/it/software/AndroidSDK)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)脚本|
|android-sdk|[setup-on-macos.sh](https://github.com/leleliu008/auto/blob/master/android-sdk/setup-on-macos.sh)|[macOS](http://blog.fpliu.com/it/os/macOS)上搭建[AndroidSDK](http://blog.fpliu.com/it/software/AndroidSDK)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)脚本|
|android-sdk|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/android-sdk/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[AndroidSDK](http://blog.fpliu.com/it/software/AndroidSDK)[POSIX Shell](http://blog.fpliu.com/it/software/sh)脚本|
|android-sdk|[setup-on-macos.sh](https://github.com/leleliu008/auto/blob/master/android-sdk/setup-on-macos.sh)|[macOS](http://blog.fpliu.com/it/os/macOS)上搭建[AndroidSDK](http://blog.fpliu.com/it/software/AndroidSDK)[POSIX Shell](http://blog.fpliu.com/it/software/sh)脚本|
|android-project|[tool.sh](https://github.com/leleliu008/auto/blob/master/android-project/tool.sh)|[Android](http://blog.fpliu.com/it/os/Android)开发中用到的[Bash](http://blog.fpliu.com/it/software/GNU/Bash)脚本|
|ios-project|[tool.sh](https://github.com/leleliu008/auto/blob/master/ios-project/tool.sh)|[iOS](http://blog.fpliu.com/it/os/iOS)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)自动构建脚本|
|GNUstep|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/GNUstep/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[GNUstep](http://blog.fpliu.com/it/software/GNUstep)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)脚本|
|zentao|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/zentao/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[禅道](http://blog.fpliu.com/it/software/zentao)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本|
|git|[setup-latest.sh](https://github.com/leleliu008/auto/blob/master/git/setup-latest.sh)|最新版本[git](http://blog.fpliu.com/it/software/git)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本|
|bash-completion|[setup.sh](https://github.com/leleliu008/auto/blob/master/bash-completion/setup.sh)|[bash-completion](http://blog.fpliu.com/it/software/bash-completion)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本|
|brew|[setup.sh](https://github.com/leleliu008/auto/blob/master/brew/setup.sh)|[HomeBrew](http://blog.fpliu.com/it/os/macOS/software/HomeBrew)[LinuxBrew](http://blog.fpliu.com/it/software/LinuxBrew)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本|
|nvm|[setup.sh](https://github.com/leleliu008/auto/blob/master/nvm/setup.sh)|[nvm](http://blog.fpliu.com/it/software/nvm)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本|
|oh-my-tmux|[setup.sh](https://github.com/leleliu008/auto/blob/master/oh-my-tmux/setup.sh)|[oh-my-tmux](http://blog.fpliu.com/it/software/Tmux#conf)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本|
|oh-my-zsh|[setup.sh](https://github.com/leleliu008/auto/blob/master/oh-my-zsh/setup.sh)|[oh-my-zsh](http://blog.fpliu.com/it/software/Oh-My-Zsh)[POSIX Shell](http://blog.fpliu.com/it/software/BourneShell)安装脚本|
|oh-my-fish|[setup.sh](https://github.com/leleliu008/auto/blob/master/oh-my-fish/setup.sh)|[oh-my-fish](http://blog.fpliu.com/it/software/Oh-My-Fish)[POSIX Shell](http://blog.fpliu.com/it/software/BourneShell)安装脚本|
|vcpkg|[setup.sh](https://github.com/leleliu008/auto/blob/master/vcpkg/setup.sh)|[vcpkg](http://blog.fpliu.com/it/software/vcpkg)[POSIX Shell](http://blog.fpliu.com/it/software/BourneShell)安装脚本|
|vim|[setup.sh](https://github.com/leleliu008/auto/blob/master/vim/setup.sh)|[Vim](http://blog.fpliu.com/it/software/Vim)[Bash](http://blog.fpliu.com/it/software/GNU/Bash)安装脚本<br>包括[YouCompleteMe](http://blog.fpliu.com/it/software/Vim/plugin/YouCompleteMe)的安装和配置好的`vimrc`|
|OpenSSL|[build-for-android.sh](https://github.com/leleliu008/auto/blob/master/OpenSSL/build-for-android.sh)|[OpenSSL](http://blog.fpliu.com/it/software/OpenSSL)构建为[Android](http://blog.fpliu.com/it/os/Android)可以使用的[Bash](http://blog.fpliu.com/it/software/GNU/Bash)脚本|
|ios-project|[tool.sh](https://github.com/leleliu008/auto/blob/master/ios-project/tool.sh)|[iOS](http://blog.fpliu.com/it/os/iOS)[POSIX Shell](http://blog.fpliu.com/it/software/sh)自动构建脚本|
|GNUstep|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/GNUstep/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[GNUstep](http://blog.fpliu.com/it/software/GNUstep)[POSIX Shell](http://blog.fpliu.com/it/software/sh)脚本|
|zentao|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/zentao/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[禅道](http://blog.fpliu.com/it/software/zentao)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|xwiki|[setup-on-gnu-linux.sh](https://github.com/leleliu008/auto/blob/master/xwiki/setup-on-gnu-linux.sh)|[GNU/Linux](http://blog.fpliu.com/it/os/Unix-like/GNU-Linux)上搭建[XWiki](http://blog.fpliu.com/it/software/XWiki)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|git|[setup-latest.sh](https://github.com/leleliu008/auto/blob/master/git/setup-latest.sh)|最新版本[git](http://blog.fpliu.com/it/software/git)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|bash-completion|[setup.sh](https://github.com/leleliu008/auto/blob/master/bash-completion/setup.sh)|[bash-completion](http://blog.fpliu.com/it/software/bash-completion)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|brew|[setup.sh](https://github.com/leleliu008/auto/blob/master/brew/setup.sh)|[HomeBrew](http://blog.fpliu.com/it/os/macOS/software/HomeBrew)[LinuxBrew](http://blog.fpliu.com/it/software/LinuxBrew)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|nvm|[setup.sh](https://github.com/leleliu008/auto/blob/master/nvm/setup.sh)|[nvm](http://blog.fpliu.com/it/software/nvm)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|oh-my-tmux|[setup.sh](https://github.com/leleliu008/auto/blob/master/oh-my-tmux/setup.sh)|[oh-my-tmux](http://blog.fpliu.com/it/software/Tmux#conf)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|oh-my-zsh|[setup.sh](https://github.com/leleliu008/auto/blob/master/oh-my-zsh/setup.sh)|[oh-my-zsh](http://blog.fpliu.com/it/software/Oh-My-Zsh)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|oh-my-fish|[setup.sh](https://github.com/leleliu008/auto/blob/master/oh-my-fish/setup.sh)|[oh-my-fish](http://blog.fpliu.com/it/software/Oh-My-Fish)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|vcpkg|[setup.sh](https://github.com/leleliu008/auto/blob/master/vcpkg/setup.sh)|[vcpkg](http://blog.fpliu.com/it/software/vcpkg)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本|
|vim|[setup.sh](https://github.com/leleliu008/auto/blob/master/vim/setup.sh)|[Vim](http://blog.fpliu.com/it/software/Vim)[POSIX Shell](http://blog.fpliu.com/it/software/sh)安装脚本<br>包括[YouCompleteMe](http://blog.fpliu.com/it/software/Vim/plugin/YouCompleteMe)的安装和配置好的`vimrc`|
|OpenSSL|[build-for-android.sh](https://github.com/leleliu008/auto/blob/master/OpenSSL/build-for-android.sh)|[OpenSSL](http://blog.fpliu.com/it/software/OpenSSL)构建为[Android](http://blog.fpliu.com/it/os/Android)可以使用的so的[POSIX Shell](http://blog.fpliu.com/it/software/sh)脚本|
8 changes: 4 additions & 4 deletions android-project/tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ msg() {
printf "%b\n" "$1"
}

success() {
msg "${Color_Green}[✔]${Color_Off} $1$2"
}

info() {
msg "${Color_Purple}[❉]${Color_Off} $1$2"
}
Expand All @@ -37,6 +33,10 @@ errorOnly() {
msg "${Color_Red}[✘]${Color_Off} $1$2"
}

success() {
msg "${Color_Green}[✔]${Color_Off} $1$2"
}

#BSD sed与GNU sed在-i参数上的使用方法不一样
sedCompatible() {
if [ "$osType" == "Darwin" ] ; then
Expand Down
Loading

0 comments on commit db7de80

Please sign in to comment.