mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
23 lines
422 B
Bash
Executable File
23 lines
422 B
Bash
Executable File
#!/bin/bash --verbose
|
|
set -e
|
|
|
|
SRC_DIR=$(dirname $(rustup which rustc))"/../lib/rustlib/src/rust/"
|
|
DST_DIR="target/libcore"
|
|
|
|
if [ ! -e $SRC_DIR ]; then
|
|
echo "Please install rust-src component"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf $DST_DIR
|
|
mkdir -p $DST_DIR/src
|
|
cp -r $SRC_DIR/src $DST_DIR/
|
|
|
|
cd $DST_DIR
|
|
git init
|
|
git add .
|
|
git commit -m "Initial commit" -q
|
|
git apply ../../000*.patch
|
|
|
|
echo "Successfully prepared libcore for building"
|