5 SRC_DIR=$(dirname $(rustup which rustc))"/../lib/rustlib/src/rust/"
8 if [ ! -e $SRC_DIR ]; then
9 echo "Please install rust-src component"
14 mkdir -p $DST_DIR/library
15 cp -r $SRC_DIR/library $DST_DIR/
24 # This is needed on systems where nothing is configured.
25 # git really needs something here, or it will fail.
26 # Even using --author is not enough.
27 git config user.email || git config user.email "none@example.com"
28 git config user.name || git config user.name "None"
30 git commit -m "Initial commit" -q
31 for file in $(ls ../../patches/ | grep -v patcha); do
32 echo "[GIT] apply" $file
33 git apply ../../patches/$file
35 git commit --no-gpg-sign -m "Patch $file"
39 echo "Successfully prepared libcore for building"