mirror of
https://github.com/topjohnwu/ondk.git
synced 2024-11-23 11:29:45 +00:00
Fix scripts
This commit is contained in:
parent
6d99867f31
commit
c79883941b
@ -3,8 +3,6 @@
|
|||||||
# Copyright 2022-2024 Google LLC.
|
# Copyright 2022-2024 Google LLC.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if ! uname | grep -q 'MINGW64_NT'; then
|
if ! uname | grep -q 'MINGW64_NT'; then
|
||||||
echo 'This script should run on MSYS2 bash'
|
echo 'This script should run on MSYS2 bash'
|
||||||
echo
|
echo
|
||||||
|
2
build.sh
2
build.sh
@ -3,8 +3,6 @@
|
|||||||
# Copyright 2022-2024 Google LLC.
|
# Copyright 2022-2024 Google LLC.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
. common.sh
|
. common.sh
|
||||||
|
|
||||||
OS=$(uname | tr '[:upper:]' '[:lower:]')
|
OS=$(uname | tr '[:upper:]' '[:lower:]')
|
||||||
|
10
clean.sh
10
clean.sh
@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright 2022-2023 Google LLC.
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
rm -rf rust llvm-project llvm_android toolchain-utils\
|
|
||||||
out out.arm out.x86 ndk tmp mingw64 \
|
|
||||||
android-ndk-*.zip ondk-* dist mingw.7z
|
|
14
common.sh
14
common.sh
@ -17,6 +17,9 @@ OUTPUT_VERSION='r27.0'
|
|||||||
|
|
||||||
PYTHON_CMD='python3'
|
PYTHON_CMD='python3'
|
||||||
|
|
||||||
|
set -e
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
# url sha
|
# url sha
|
||||||
git_clone_sha() {
|
git_clone_sha() {
|
||||||
local dir=${1##*/}
|
local dir=${1##*/}
|
||||||
@ -36,9 +39,9 @@ git_clone_branch() {
|
|||||||
clone() {
|
clone() {
|
||||||
git_clone_branch https://github.com/rust-lang/rust $RUST_VERSION
|
git_clone_branch https://github.com/rust-lang/rust $RUST_VERSION
|
||||||
cd rust
|
cd rust
|
||||||
# for p in ../patches/*.patch; do
|
for p in ../patches/*.patch; do
|
||||||
# patch -p1 < $p
|
patch -p1 < $p
|
||||||
# done
|
done
|
||||||
# Skip rust llvm
|
# Skip rust llvm
|
||||||
sed 's:\[submodule "src/llvm-project"\]:&\n\tupdate = none:' .gitmodules > .gitmodules.p
|
sed 's:\[submodule "src/llvm-project"\]:&\n\tupdate = none:' .gitmodules > .gitmodules.p
|
||||||
mv .gitmodules.p .gitmodules
|
mv .gitmodules.p .gitmodules
|
||||||
@ -117,6 +120,11 @@ run_cmd() {
|
|||||||
rm -rf dist ondk-*
|
rm -rf dist ondk-*
|
||||||
dist
|
dist
|
||||||
;;
|
;;
|
||||||
|
clean)
|
||||||
|
rm -rf rust llvm-project llvm_android toolchain-utils \
|
||||||
|
out out.arm out.x86 ndk tmp mingw64 \
|
||||||
|
android-ndk-*.zip ondk-* dist mingw.7z
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown action \"$1\""
|
echo "Unknown action \"$1\""
|
||||||
echo "./build.sh clone/build/ndk/dist"
|
echo "./build.sh clone/build/ndk/dist"
|
||||||
|
Loading…
Reference in New Issue
Block a user