Skip to content

Commit 9d35095

Browse files
committed
update shell
1 parent 4b80496 commit 9d35095

15 files changed

+43
-40
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ At present MRFFToolChain contained OpenSSL、FFmpeg 、libyuv、libopus、libblu
7575

7676
```
7777
#准备 iOS 和 macOS 平台所有库的源码
78-
./init-all.sh all
78+
./init-any.sh all
7979
#准备 iOS 平台源码所有库的源码
80-
./init-all.sh ios
80+
./init-any.sh ios
8181
#准备 iOS 平台x86架构下所有库的源码
82-
./init-all.sh ios all x86_64
82+
./init-any.sh ios all x86_64
8383
#准备 macOS 平台源码所有库的源码
84-
/init-all.sh macos
84+
/init-any.sh macos
8585
#准备 ios 平台的某些库的源码
86-
/init-all.sh ios "openssl ffmpeg"
86+
/init-any.sh ios "openssl ffmpeg"
8787
#准备 macOS 平台的某些库的源码
88-
/init-all.sh macos "openssl ffmpeg"
88+
/init-any.sh macos "openssl ffmpeg"
8989
#准备 iOS 和 macOS 平台的某些库的源码
90-
/init-all.sh all "openssl ffmpeg"
90+
/init-any.sh all "openssl ffmpeg"
9191
```
9292

9393
高级选项:
@@ -147,7 +147,7 @@ cd macos
147147

148148
编译 ios 平台跟 macos 是一样的流程,只需要 cd 到 ios 目录操作即可。
149149

150-
其实 ios 和 macos 均调用了 apple 目录下的脚本。
150+
实际上 ios 和 macos 均调用了 apple 目录下的脚本。
151151

152152
## Use Your Mirror
153153

apple/compile-any.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ OPTS=$5
2525
set -e
2626

2727
# 当前脚本所在目录
28-
cd "$(dirname "$0")"
29-
SHELL_DIR="$PWD"
28+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
29+
cd "$THIS_DIR"
3030

3131
function usage() {
3232
echo " useage:"
@@ -60,8 +60,8 @@ if [[ -z "$CMD" ]]; then
6060
exit 1
6161
fi
6262

63-
export XC_SRC_ROOT="${SHELL_DIR}/../build/src/${PLAT}"
64-
export XC_PRODUCT_ROOT="${SHELL_DIR}/../build/product/${PLAT}"
63+
export XC_SRC_ROOT="${THIS_DIR}/../build/src/${PLAT}"
64+
export XC_PRODUCT_ROOT="${THIS_DIR}/../build/product/${PLAT}"
6565
export XC_UNI_PROD_DIR="${XC_PRODUCT_ROOT}/universal"
6666

6767
export XC_PLAT="$PLAT"

apple/do-compile/any.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
set -e
1919

2020
# 当前脚本所在目录
21-
TOOLS=$(dirname "$0")
22-
source $TOOLS/../../tools/env_assert.sh
21+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
22+
source $THIS_DIR/../../tools/env_assert.sh
2323

2424
echo "=== [$0] check env begin==="
2525
env_assert "XC_CMD"

apple/do-compile/bluray.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
set -e
1919

20-
TOOLS=$(dirname "$0")
21-
source $TOOLS/../../tools/env_assert.sh
20+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
21+
source $THIS_DIR/../../tools/env_assert.sh
2222

2323
echo "=== [$0] check env begin==="
2424
env_assert "XC_ARCH"

apple/do-compile/dav1d.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
set -e
1919

20-
TOOLS=$(dirname "$0")
21-
source $TOOLS/../../tools/env_assert.sh
20+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
21+
source $THIS_DIR/../../tools/env_assert.sh
2222

2323
echo "=== [$0] check env begin==="
2424
env_assert "XC_ARCH"

apple/do-compile/ffmpeg.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
set -e
2222

23-
TOOLS=$(dirname "$0")
24-
source $TOOLS/../../tools/env_assert.sh
23+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
24+
source $THIS_DIR/../../tools/env_assert.sh
2525

2626
echo "=== [$0] check env begin==="
2727
env_assert "XC_TAGET_OS"
@@ -36,7 +36,7 @@ echo "XC_OPTS:$XC_OPTS"
3636
echo "===check env end==="
3737

3838
# ffmpeg build params
39-
source $(pwd)/../ffconfig/module.sh
39+
source $THIS_DIR/../../ffconfig/module.sh
4040
FFMPEG_CFG_FLAGS="$COMMON_FF_CFG_FLAGS"
4141

4242
FFMPEG_CFG_FLAGS="--prefix=$XC_BUILD_PREFIX $FFMPEG_CFG_FLAGS"

apple/do-compile/libyuv.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
set -e
1919

20-
TOOLS=$(dirname "$0")
21-
source $TOOLS/../../tools/env_assert.sh
20+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
21+
source $THIS_DIR/../../tools/env_assert.sh
2222

2323
echo "=== [$0] check env begin==="
2424
env_assert "XC_ARCH"

apple/do-compile/openssl.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
set -e
2323

24-
TOOLS=$(dirname "$0")
25-
source $TOOLS/../../tools/env_assert.sh
24+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
25+
source $THIS_DIR/../../tools/env_assert.sh
2626

2727
echo "=== [$0] check env begin==="
2828
env_assert "XC_ARCH"

apple/do-compile/opus.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
set -e
1919

20-
TOOLS=$(dirname "$0")
21-
source $TOOLS/../../tools/env_assert.sh
20+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
21+
source $THIS_DIR/../../tools/env_assert.sh
2222

2323
echo "=== [$0] check env begin==="
2424
env_assert "XC_ARCH"

download-pre.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ if test -z $PLAT ;then
2424
PLAT='all'
2525
fi
2626

27-
cd $(dirname "$0")
28-
c_dir="$PWD"
27+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
28+
cd "$THIS_DIR"
2929

3030
function usage() {
3131
echo "=== useage ===================="

init-any.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ ARCH=$3
2929

3030
set -e
3131

32-
cd $(dirname "$0")
33-
c_dir="$PWD"
32+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
33+
cd "$THIS_DIR"
3434

3535
function usage()
3636
{
@@ -51,11 +51,11 @@ if [[ "x$LIBS" == "x" || "$LIBS" == "all" ]]; then
5151
fi
5252

5353
if [[ "$PLAT" == 'ios' || "$PLAT" == 'macos' || "$PLAT" == 'all' ]]; then
54-
source "$c_dir/version.sh"
54+
source "$THIS_DIR/version.sh"
5555
for lib in $LIBS
5656
do
5757
echo "===[init $lib]===================="
58-
$c_dir/tools/init-repo.sh "$c_dir/init-cfgs/$lib" "$PLAT" "$ARCH"
58+
$THIS_DIR/tools/init-repo.sh "$THIS_DIR/init-cfgs/$lib" "$PLAT" "$ARCH"
5959
echo "===================================="
6060
done
6161
else

ios/compile-any.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
set -e
1919

2020
# 当前脚本所在目录
21-
cd "$(dirname "$0")"
21+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
22+
cd "$THIS_DIR"
23+
2224
../apple/compile-any.sh ios $*

macos/compile-any.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
set -e
1919

2020
# 当前脚本所在目录
21-
cd "$(dirname "$0")"
21+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
22+
cd "$THIS_DIR"
2223

2324
../apple/compile-any.sh macos $*

tools/init-repo.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ set -e
2020

2121
source $1
2222

23-
TOOLS=$(dirname "$0")
24-
source ${TOOLS}/env_assert.sh
23+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
24+
source ${THIS_DIR}/env_assert.sh
2525

2626
echo "===check env begin==="
2727
echo "argv:[$*]"
@@ -86,7 +86,7 @@ function apply_patches() {
8686
fi
8787

8888
local plat="$1"
89-
local patch_dir="${TOOLS}/../extra/patches/$REPO_DIR"
89+
local patch_dir="${THIS_DIR}/../extra/patches/$REPO_DIR"
9090

9191
if [[ -d "${patch_dir}_${plat}" ]]; then
9292
patch_dir="${patch_dir}_${plat}"
@@ -107,7 +107,7 @@ function apply_patches() {
107107
function make_arch_repo() {
108108
local dest_repo="build/src/$1/$REPO_DIR-$2"
109109
echo "== copy $REPO_DIR$dest_repo =="
110-
$TOOLS/copy-local-repo.sh $GIT_LOCAL_REPO $dest_repo
110+
$THIS_DIR/copy-local-repo.sh $GIT_LOCAL_REPO $dest_repo
111111
cd $dest_repo
112112
if [[ "$GIT_WITH_SUBMODULE" ]]; then
113113
git submodule update --init --depth=1

version.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export IJK_VERSION=0.10.1
1+
export IJK_VERSION=0.10.3

0 commit comments

Comments
 (0)