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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
if ! uname | grep -q 'MINGW64_NT'; then
|
||||
echo 'This script should run on MSYS2 bash'
|
||||
echo
|
||||
|
2
build.sh
2
build.sh
@ -3,8 +3,6 @@
|
||||
# Copyright 2022-2024 Google LLC.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
. common.sh
|
||||
|
||||
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'
|
||||
|
||||
set -e
|
||||
shopt -s nullglob
|
||||
|
||||
# url sha
|
||||
git_clone_sha() {
|
||||
local dir=${1##*/}
|
||||
@ -36,9 +39,9 @@ git_clone_branch() {
|
||||
clone() {
|
||||
git_clone_branch https://github.com/rust-lang/rust $RUST_VERSION
|
||||
cd rust
|
||||
# for p in ../patches/*.patch; do
|
||||
# patch -p1 < $p
|
||||
# done
|
||||
for p in ../patches/*.patch; do
|
||||
patch -p1 < $p
|
||||
done
|
||||
# Skip rust llvm
|
||||
sed 's:\[submodule "src/llvm-project"\]:&\n\tupdate = none:' .gitmodules > .gitmodules.p
|
||||
mv .gitmodules.p .gitmodules
|
||||
@ -117,6 +120,11 @@ run_cmd() {
|
||||
rm -rf dist ondk-*
|
||||
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 "./build.sh clone/build/ndk/dist"
|
||||
|
Loading…
Reference in New Issue
Block a user