Improve prepare_libcore.sh
This commit is contained in:
parent
a1b8e02a88
commit
c6bb2e7223
1 changed files with 10 additions and 7 deletions
|
@ -1,11 +1,14 @@
|
||||||
#!/bin/bash --verbose
|
#!/bin/bash --verbose
|
||||||
|
set -e
|
||||||
|
|
||||||
SRC_DIR="target/libcore"
|
SRC_DIR="target/libcore"
|
||||||
rm -rf $SRC_DIR &&
|
rm -rf $SRC_DIR
|
||||||
mkdir -p $SRC_DIR/src &&
|
mkdir -p $SRC_DIR/src
|
||||||
cp -r $(dirname $(rustup which rustc))/../lib/rustlib/src/rust/src/libcore $SRC_DIR/src/libcore || (echo "Please install rust-src component"; exit 1)
|
cp -r $(dirname $(rustup which rustc))/../lib/rustlib/src/rust/src/libcore $SRC_DIR/src/libcore || (echo "Please install rust-src component"; exit 1)
|
||||||
cd $SRC_DIR || exit 1
|
cd $SRC_DIR
|
||||||
git init || exit 1
|
git init
|
||||||
git add . || exit 1
|
git add .
|
||||||
git commit -m "Initial commit" -q || exit 1
|
git commit -m "Initial commit" -q
|
||||||
git apply ../../000*.patch || exit 1
|
git apply ../../000*.patch
|
||||||
|
|
||||||
echo "Successfully prepared libcore for building"
|
echo "Successfully prepared libcore for building"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue