mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
13c20fc803
This is really annoying when commit.gpgSign is enabled globally.
32 lines
621 B
Bash
Executable File
32 lines
621 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
cd $(dirname "$0")
|
|
|
|
SRC_DIR=$(dirname $(rustup which rustc))"/../lib/rustlib/src/rust/"
|
|
DST_DIR="sysroot_src"
|
|
|
|
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/
|
|
|
|
pushd $DST_DIR
|
|
echo "[GIT] init"
|
|
git init
|
|
echo "[GIT] add"
|
|
git add .
|
|
echo "[GIT] commit"
|
|
git commit -m "Initial commit" -q
|
|
for file in $(ls ../../patches/ | grep -v patcha); do
|
|
echo "[GIT] apply" $file
|
|
git apply ../../patches/$file
|
|
git commit --no-gpg-sign -am "Patch $file"
|
|
done
|
|
popd
|
|
|
|
echo "Successfully prepared libcore for building"
|